-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
47 lines (44 loc) · 1.89 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
version: '3'
services:
traefik:
image: traefik:1.7.12-alpine
command: --api --docker
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
node:
build: ./
image: node_image
ports:
- "4000:4000"
volumes:
- ./app:/home/node/app
- node_modules:/home/node/app/node_modules
labels:
traefik.frontend.rule: "Host:node.local"
node2:
image: node_image
depends_on:
- node
ports:
- "4004:4000"
volumes:
- ./app:/home/node/app
- node_modules:/home/node/app/node_modules
labels:
traefik.auth.frontend.rule: "Host:node2.local"
traefik.frontend.headers.customResponseHeaders: "Access-Control-Allow-Origin:http://node.local||Access-Control-Allow-Method:GET,POST,PUT,PATCH,DELETE,OPTIONS||Access-Control-Allow-Credentials:true"
traefik.frontend.headers.customRequestHeaders: "Access-Control-Allow-Origin:http://node.local||Access-Control-Allow-Credentials:true"
# traefik.frontend.headers.customResponseHeaders: "Access-Control-Allow-Origin:*||Access-Control-Allow-Method:GET,POST,PUT,PATCH,DELETE,OPTIONS||Access-Control-Allow-Headers:apikey,authorization,content-type||Access-Control-Allow-Credentials:true"
# traefik.frontend.headers.customRequestHeaders: "Access-Control-Allow-Origin:*"
# traefik.frontend.whiteList.sourceRange: "127.0.0.1"
# traefik.frontend.passHostHeader: true
# traefik.frontend.whiteList.useXForwardedFor: "true"
# traefik.frontend.auth.basic.removeHeader: "true"
traefik.auth.frontend.auth.basic.users: "test:$$apr1$$PcLSHB5h$$p/35NmUIT/H7NP58XbvWt0" # user: test, pwd: test
# note additional symbol "$" makes escaping.
# traefik.noauth.frontend.rule: "Method:OPTIONS,Host:node2.local"
volumes:
node_modules: