-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
59 lines (55 loc) · 1.86 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
48
49
50
51
52
53
54
55
56
57
58
59
version: '3.7'
services:
reverse-proxy:
image: traefik:2.1 # The official Traefik docker image
command:
- --api.insecure=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
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
demo:
image: nginx
volumes:
- ./demo:/usr/share/nginx/html:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.demo.rule=Host(`demo.${SCOPE}`)"
- "traefik.http.services.demo.loadbalancer.server.port=80"
- "traefik.http.services.demo.loadbalancer.passhostheader=false"
- "traefik.http.middlewares.demo.forwardauth.address=http://demo.${SCOPE}/auth"
- "traefik.http.middlewares.demo.forwardauth.authResponseHeaders=X-Forwarded-User"
- "traefik.http.middlewares.demo.forwardauth.trustForwardHeader=true"
server:
build: .
volumes:
- /home/node/app/node_modules
- .:/home/node/app
labels:
- "traefik.enable=true"
- "traefik.http.routers.auth.rule=Host(`auth.${SCOPE}`)"
- "traefik.http.services.auth.loadbalancer.server.port=4000"
- "traefik.http.services.auth.loadbalancer.passhostheader=false"
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: