-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose-local.yml
130 lines (120 loc) · 3.65 KB
/
docker-compose-local.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
version: '3'
networks:
main:
services:
traefik:
image: "traefik:v2.4"
container_name: "traefik"
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.http.address=:80"
- "--global.sendAnonymousUsage=false"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
db:
container_name: "${DB_HOST}"
image: postgres:12.4-alpine
volumes:
- "./.data:/var/lib/postgresql/data:rw"
ports:
- "5432:5432"
environment:
POSTGRES_DB: "${DB_NAME}"
POSTGRES_USER: "${DB_USER}"
POSTGRES_PASSWORD: "${DB_PASS}"
restart: unless-stopped
labels:
traefik.enable: true
traefik.http.routers.pg-web.rule: Host(`${DB_HOST}`)
traefik.http.routers.pg-web.entrypoints: http
api:
container_name: "${API_URL}"
build:
context: ./backend
dockerfile: ./registry/${ENVIRONMENT}/Dockerfile
volumes:
- "./backend:/opt/app-root/src:rw"
ports:
- ${CONTAINERS_PORT}
- "9229:9229"
environment:
PORT: ${CONTAINERS_PORT}
APP_ENV: "${ENVIRONMENT}"
NODE_ENV: "${ENVIRONMENT}"
HASH_SECRET: ${HASH_SECRET}
JWT_SECRET: ${JWT_SECRET}
TOKEN_EXPIRE_IN: ${TOKEN_EXPIRE_IN}
REFRESHTOKEN_EXPIRE_IN_DAYS: ${REFRESHTOKEN_EXPIRE_IN_DAYS}
SIMPLE_USER: "${SIMPLE_USER}"
SYSTEM_USER: "${SYSTEM_USER}"
COMPANY_DOMAIN: "thegodstack.com"
JWT_AUD: ${JWT_AUD}
JWT_ISS: ${JWT_ISS}
EMAIL_FROM: ${EMAIL_FROM}
SENDGRID_API_KEY: ${SENDGRID_API_KEY}
SPA_URL: ${SPA_URL}
DB_PORT: "${DB_PORT}"
DB_HOST: "${DB_HOST}"
DB_USER: "${DB_USER}"
DB_PASS: "${DB_PASS}"
DB_DATABASE: "${DB_NAME}"
DEBUG: "true"
command: ['./wait-for-it.sh', '-t', '0', '${DB_HOST}:5432', '--', '.s2i/bin/assemble']
restart: unless-stopped
labels:
traefik.enable: true
traefik.http.routers.api-web.rule: Host(`${API_URL}`)
traefik.http.routers.api-web.entrypoints: http
spa:
container_name: "${SPA_URL}"
build:
context: ./frontend
dockerfile: ./registry/${ENVIRONMENT}/Dockerfile
volumes:
- "./frontend:/opt/app-root/src:rw"
ports:
- ${CONTAINERS_PORT}
environment:
PORT: ${CONTAINERS_PORT}
APP_ENV: "${ENVIRONMENT}"
NODE_ENV: "${ENVIRONMENT}"
HTTP_API_URL: 'http://${API_URL}/'
HTTP_SPA_URL: 'http://${SPA_URL}/'
WS_API_URL: 'ws://${API_URL}/graphql'
CLIENT: "${CLIENT}"
DEBUG: "true"
command: ['./wait-for-it.sh', '-t', '0', '${API_URL}:${CONTAINERS_PORT}', '--', '.s2i/bin/assemble']
restart: unless-stopped
labels:
traefik.enable: true
traefik.http.routers.spa-web.rule: Host(`${SPA_URL}`)
traefik.http.routers.spa-web.entrypoints: http
stories:
container_name: "${SPA_STORYBOOK_URL}"
build:
context: ./frontend
dockerfile: ./registry/${ENVIRONMENT}/Dockerfile
volumes:
- "./frontend:/opt/app-root/src:rw"
ports:
- ${CONTAINERS_PORT}
environment:
PORT: ${CONTAINERS_PORT}
APP_ENV: "${ENVIRONMENT}"
NODE_ENV: "${ENVIRONMENT}"
HTTP_API_URL: 'http://${API_URL}/'
HTTP_SPA_URL: 'http://${SPA_URL}/'
WS_API_URL: 'ws://${API_URL}/graphql'
CLIENT: "${CLIENT}"
DEBUG: "true"
STORIES: "true"
command: ['./wait-for-it.sh', '-t', '0', '${SPA_URL}:${CONTAINERS_PORT}', '--', '.s2i/bin/assemble']
restart: unless-stopped
labels:
traefik.enable: true
traefik.http.routers.stories-web.rule: Host(`${SPA_STORYBOOK_URL}`)
traefik.http.routers.stories-web.entrypoints: http