-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
185 lines (185 loc) · 4.78 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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
services:
cms:
container_name: regels_cms
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ['CMD', 'wget', '-qO-', 'http://cms:9001']
interval: 10s
timeout: 5s
retries: 10
start_period: 10s
build:
context: .
dockerfile: apps/cms/Dockerfile
target: dev
args:
PUBLIC_URL: http://localhost/cms/
volumes:
- ./apps/cms/config:/app/apps/cms/config
- ./apps/cms/database:/app/apps/cms/database
- ./apps/cms/public:/app/apps/cms/public
- ./apps/cms/src:/app/apps/cms/src
environment:
- PUBLIC_URL=http://localhost/cms/
- DATABASE_CLIENT=postgres
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/strapi
- JWT_SECRET=jwt-secret
- ADMIN_JWT_SECRET=admin-jwt-secret
- API_TOKEN_SALT=token-salt
- APP_KEYS=a,b,c
- VIRTUAL_HOST=localhost
- VIRTUAL_PATH=/cms/
- VIRTUAL_DEST=/
- VIRTUAL_PORT=9001
docs:
container_name: regels_docs
restart: unless-stopped
healthcheck:
test: ['CMD', 'curl', '-f', 'http://docs:9002']
interval: 10s
timeout: 5s
retries: 10
start_period: 10s
volumes:
- ./apps/docs/docs:/app/apps/docs/docs
- ./apps/docs/static:/app/apps/docs/static
- ./apps/docs/src:/app/apps/docs/src
ports:
- 9002:9002
build:
context: .
dockerfile: apps/docs/Dockerfile
target: dev
args:
GID: ${GID:-1001}
UID: ${UID:-1001}
environment:
- PORT=9002
- BASE_URL=/docs/
- VIRTUAL_HOST=localhost
- VIRTUAL_PATH=/docs/
- VIRTUAL_DEST=/docs/
- VIRTUAL_PORT=9002
docs-beta:
container_name: regels_docs_beta
restart: unless-stopped
healthcheck:
test: ['CMD', 'curl', '-f', 'http://docs-beta:9003']
interval: 10s
timeout: 5s
retries: 10
start_period: 10s
volumes:
- ./apps/docs-beta/docs:/app/apps/docs-beta/docs
- ./apps/docs-beta/static:/app/apps/docs-beta/static
- ./apps/docs-beta/src:/app/apps/docs-beta/src
build:
context: .
dockerfile: apps/docs-beta/Dockerfile
target: dev
args:
GID: ${GID:-1001}
UID: ${UID:-1001}
ports:
- 9003:9003
environment:
- PORT=9003
- BASE_URL=/docs-beta/
- VIRTUAL_HOST=localhost
- VIRTUAL_PATH=/docs-beta/
- VIRTUAL_DEST=/docs-beta/
- VIRTUAL_PORT=9003
web:
container_name: regels_web
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ['CMD', 'wget', '-qO-', 'http://web:9000']
interval: 10s
timeout: 5s
retries: 10
start_period: 10s
volumes:
- ./apps/web/src:/app/apps/web/src
- ./apps/web/public:/app/apps/web/public
build:
context: .
dockerfile: apps/web/Dockerfile
target: dev
args:
GID: ${GID:-1001}
UID: ${UID:-1001}
environment:
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/strapi
- CMS_URL=http://cms:9001
- NEXT_PUBLIC_CMS_URL=http://localhost/cms
- WEB_URL=http://localhost:9000
- NEXT_PUBLIC_WEB_URL=http://localhost
- VIRTUAL_HOST=localhost,waardelijsten.localhost
- VIRTUAL_PATH=/
- VIRTUAL_DEST=/
- VIRTUAL_PORT=9000
storybook:
container_name: regels_storybook
restart: unless-stopped
volumes:
- ./apps/web/src:/app/apps/web/src
- ./apps/web/public:/app/apps/web/public
- ./apps/web/.storybook:/app/apps/web/.storybook
build:
context: .
dockerfile: apps/web/Dockerfile
target: storybook-dev
args:
GID: ${GID:-1001}
UID: ${UID:-1001}
ports:
- 6006:6006
environment:
- VIRTUAL_HOST=localhost
- VIRTUAL_PATH=/storybook/
- VIRTUAL_DEST=/
- VIRTUAL_PORT=6006
postgres:
image: postgres:14.5
container_name: regels_postgres
restart: unless-stopped
healthcheck:
test: ['CMD-SHELL', 'pg_isready']
interval: 10s
timeout: 5s
retries: 5
volumes:
- regels-pgdata:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=strapi
ports:
- 5433:5432
nginx:
container_name: regels_nginx_proxy
image: nginxproxy/nginx-proxy:latest
restart: unless-stopped
ports:
- '80:80'
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
adminer:
container_name: regels_adminer
image: adminer
restart: unless-stopped
ports:
- 8080:8080
environment:
- VIRTUAL_HOST=localhost
- VIRTUAL_PATH=/adminer/
- VIRTUAL_DEST=/
- VIRTUAL_PORT=8080
volumes:
regels-pgdata: