-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose-traefik-v1.yml
54 lines (50 loc) · 1.67 KB
/
docker-compose-traefik-v1.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
48
49
50
51
52
53
54
version: '3.7'
services:
reverse-proxy:
image: traefik:v1.7 # The official Traefik docker image
command: --api --docker # Enables the web UI and tells Traefik to listen to docker
ports:
- "80:80" # The HTTP port
- "8888:8080" # The Web UI (enabled by --api)
volumes:
- /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events
nginx:
image: nginx
volumes:
- ./demo:/usr/share/nginx/html:ro
labels:
- "traefik.enable=true" # Enable reverse-proxy for this service
- "traefik.frontend.rule=Host:demo.haxcms.localhost"
- "traefik.frontend.auth.forward.address=http://auth.haxcms.localhost/auth"
- traefik.frontend.auth.forward.authResponseHeaders=X-Forwarded-User
- traefik.frontend.auth.forward.trustForwardHeader=true
- "traefik.port=80"
server:
build: .
volumes:
- /home/node/app/node_modules
- .:/home/node/app
labels:
- "traefik.enable=true" # Enable reverse-proxy for this service
- "traefik.frontend.rule=Host:auth.haxcms.localhost"
- "traefik.port=4000"
- "traefik.frontend.passHostHeader=true"
environment:
- PRISMA_DB_PROVIDER=postgresql
- PRISMA_DB_URL=postgresql://prisma:prisma@postgres/
- GITHUB_SCOPE=user:email,read:user,public_rep
depends_on:
- postgres
postgres:
image: postgres:10.3
restart: always
environment:
POSTGRES_USER: prisma
POSTGRES_PASSWORD: prisma
volumes:
- postgres:/var/lib/postgresql/data
labels:
- "traefik.enable=true" # Enable reverse-proxy for this service
- "traefik.port=5432"
volumes:
postgres: