-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
91 lines (84 loc) · 2.01 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: '3.4'
services:
traefik:
container_name: traefik
image: traefik:1.7.12-alpine
ports:
- "80:80"
labels:
- traefik.enable=true
- traefik.port=8080
- traefik.frontend.rule=Host:traefik.${DOMAIN}
- traefik.backend=traefik
- traefik.frontend.auth.basic=${TRAEFIK_AUTH}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
web:
container_name: web
depends_on:
- api
build:
context: ./deps/front
dockerfile: Dockerfile
labels:
- traefik.enable=true
- traefik.frontend.rule=Host:${DOMAIN}
- traefik.backend=web
api:
container_name: api
depends_on:
- prisma
build:
context: ./deps/back
dockerfile: Dockerfile
labels:
- traefik.enable=true
- traefik.port=4000
- traefik.frontend.rule=Host:api.${DOMAIN}
- traefik.backend=api
environment:
CLIENT_HOSTS:
JWT_SECRET:
NODE_ENV:
PRISMA_ENDPOINT: http://prisma:4466
PRISMA_SERVICE:
PRISMA_STAGE:
PRISMA_SERVICE_SECRET:
prisma:
container_name: prisma
image: prismagraphql/prisma:1.27
restart: always
depends_on:
- postgres
environment:
PRISMA_CONFIG: |
port: ${PRISMA_PORT}
managementApiSecret: ${PRISMA_MANAGEMENT_API_SECRET}
databases:
default:
connector: postgres
host: postgres
port: 5432
user: ${POSTGRES_USER}
password: ${POSTGRES_PASSWORD}
migrations: true
rawAccess: true
labels:
- traefik.enable=true
- traefik.port=${PRISMA_PORT}
- traefik.frontend.rule=Host:prisma.${DOMAIN}
- traefik.backend=prisma
postgres:
container_name: postgres
image: postgres:10.3
restart: always
environment:
POSTGRES_USER:
POSTGRES_PASSWORD:
labels:
- traefik.enable=true
- traefik.backend=postgres
volumes:
- postgres:/var/lib/postgesql/data
volumes:
postgres: