generated from ConductionNL/Proto-component-commonground
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
260 lines (242 loc) · 8.46 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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
version: '3.5'
x-cache:
&cache
cache_from:
- ${CONTAINER_REGISTRY_BASE}/${CONTAINER_PROJECT_NAME}-php
- ${CONTAINER_REGISTRY_BASE}/${CONTAINER_PROJECT_NAME}-nginx
- ${CONTAINER_REGISTRY_BASE}/${CONTAINER_PROJECT_NAME}-varnish
- ${CONTAINER_REGISTRY_BASE}/${CONTAINER_PROJECT_NAME}-phpdoc
- ${CONTAINER_REGISTRY_BASE}/${CONTAINER_PROJECT_NAME}-sphinx
services:
php:
&php
image: ${CONTAINER_REGISTRY_BASE}/${CONTAINER_PROJECT_NAME}-php:${APP_ENV}
build:
context: ./api
target: api_platform_php
<<: *cache
depends_on:
- db
volumes:
- ./api/bin:/srv/api/bin:rw,cached
- ./api/config:/srv/api/config:rw,cached
- ./api/docker:/srv/api/docker:rw,cached
- ./api/helm:/srv/api/helm:rw,cached
- ./api/migrations:/srv/api/migrations:rw,cached
- ./api/public:/srv/api/public:rw,cached
- ./api/src:/srv/api/src:rw,cached
- ./api/templates:/srv/api/templates:rw,cached
- ./api/tests:/srv/api/tests:rw,cached
- ./api/translations:/srv/api/translations:rw,cached
- ./api/composer.json:/srv/api/composer.json:rw,cached
- ./api/composer.lock:/srv/api/composer.lock:rw,cached
- ./nlx-setup:/cert:rw,cached
#- ./nlx-setup:/Users/<your-username>/nlx-setup:rw,cached
# If you develop on Linux, uncomment the following line to use a bind-mounted host directory instead
- ./api/var:/srv/api/var:rw
environment:
- CONTAINER_REGISTRY_BASE=${CONTAINER_REGISTRY_BASE}
- CONTAINER_PROJECT_NAME=${CONTAINER_PROJECT_NAME}
- CONTAINER_REPRO=${CONTAINER_REPRO}
#- DATABASE_URL=postgres://api-platform:!ChangeMe!@db/api?serverVersion=10.1
- DATABASE_URL=mysql://api-platform:!ChangeMe!@db/api?serverVersion=10.1
- APP_ENV=${APP_ENV}
- APP_DEBUG=${APP_DEBUG}
- APP_CACHE=${APP_CACHE}
- APP_VERSION=${APP_VERSION}
- APP_MAJOR_VERSION=${APP_MAJOR_VERSION}
- APP_NAME=${APP_NAME}
- APP_TITLE=${APP_TITLE}
- APP_ID=${APP_ID}
- APP_DOMAIN=${APP_DOMAIN}
- APP_SUBDOMAIN=${APP_SUBDOMAIN}
- APP_SUBPATH=${APP_SUBPATH}
- APP_SUBPATH_ROUTING=${APP_SUBPATH_ROUTING}
- APP_DEMO=${APP_DEMO}
- APP_REPRO=${APP_REPRO}
- APP_CONTAINER=${APP_CONTAINER}
- APP_DESCRIPTION=${APP_DESCRIPTION}
- APP_TYPE=${APP_TYPE}
- APP_LOGO=${APP_LOGO}
- APP_HOME=${APP_HOME}
- APP_COMMONGROUND_ID=${APP_COMMONGROUND_ID}
- APP_COMMONGROUND_KEY=${APP_COMMONGROUND_KEY}
- APP_APPLICATION_KEY=${APP_APPLICATION_KEY}
- APP_USER_KEY=${APP_USER_KEY}
- APP_BUILD_ALL_FIXTURES=${APP_BUILD_ALL_FIXTURES}
- APP_WEB=${APP_WEB}
- APP_INTERNAL=${APP_INTERNAL}
- APP_URL=${APP_URL}
- ORGANIZATION_NAME=${ORGANIZATION_NAME}
- ORGANIZATION_EMAIL_ADDRESS=${ORGANIZATION_EMAIL_ADDRESS}
- ORGANIZATION_COUNTRY_NAME=${ORGANIZATION_COUNTRY_NAME}
- ORGANIZATION_STATE=${ORGANIZATION_STATE}
- ORGANIZATION_LOCALITY=${ORGANIZATION_LOCALITY}
- ORGANIZATION_UNIT_NAME=${ORGANIZATION_UNIT_NAME}
- TRUSTED_PROXIES=${TRUSTED_PROXIES}
- TRUSTED_HOSTS=${TRUSTED_HOSTS}
- AUTH_ENABLED=${AUTH_ENABLED}
- AUTH_PROVIDER_USER=${AUTH_PROVIDER_USER}
- AUTH_PROVIDER_APPLICATION=${AUTH_PROVIDER_APPLICATION}
- AUDITTRAIL_ENABLED=${AUDITTRAIL_ENABLED}
- NOTIFICATION_ENABLED=${NOTIFICATION_ENABLED}
- HEALTH_ENABLED=${HEALTH_ENABLED}
- ARCHIVE_ENABLED=${ARCHIVE_ENABLED}
- NLX_OUTWAY=${NLX_OUTWAY}
- NLX_INWAY=${NLX_INWAY}
- APP_COMMONGROUND_ZRC_LOCATION=${APP_COMMONGROUND_ZRC_LOCATION}
- APP_COMMONGROUND_ZTC_LOCATION=${APP_COMMONGROUND_ZTC_LOCATION}
- REDIS_HOST=redis
- REDIS_PORT=6379
ports:
- "82:80"
api:
&nginx
image: ${CONTAINER_REGISTRY_BASE}/${CONTAINER_PROJECT_NAME}-nginx:${APP_ENV}
build:
context: ./api
target: api_platform_nginx
<<: *cache
depends_on:
- php
# Comment out this volume in production if you do not want to use nlx
# - nlx-outway
# If you us this docker-compose file for production enviroments and want to us nlx-inway uncomment the following lins
# - nlx-inway
# Comment out this volume in production
volumes:
- ./api/public:/srv/api/public:ro
ports:
- "80:80"
environment:
- NGINX_HOST=php
cache-proxy:
&varnish
image: ${CONTAINER_REGISTRY_BASE}/${CONTAINER_PROJECT_NAME}-varnish:${APP_ENV}
build:
context: ./api
target: api_platform_varnish
<<: *cache
depends_on:
- api
- php
volumes:
- ./api/docker/varnish/conf:/usr/local/etc/varnish:rw,cached
tmpfs:
- /usr/local/var/varnish:exec
ports:
- "81:80"
environment:
- BACKENDS=php
# nlx-outway:
# image: ${CONTAINER_REGISTRY_BASE}/${CONTAINER_PROJECT_NAME}-nlx-outway:${APP_ENV}
# build:
# context: ./api
# target: api-nlx-outway
# depends_on:
# - nlx-postgres
# volumes:
# - ./api/nlx-setup:/certs:rw,cached
# environment:
# - DIRECTORY_INSPECTION_ADDRESS=directory-inspection-api.demo.nlx.io:443
# - TLS_NLX_ROOT_CERT=/certs/root.crt
# - TLS_ORG_CERT=/certs/org.crt
# - TLS_ORG_KEY=/certs/org.key
# - POSTGRES_DSN=postgres://postgres:postgres@nlx-postgres/txlog-db?sslmode=disable&connect_timeout=10
# networks:
# - nlx
# Uncomment the follwoign lines if you want to deploy trough a docker-compose chart and wish to use an nlx inway
#
# nlx-inway:
# image: ${CONTAINER_REGISTRY_BASE}/${CONTAINER_PROJECT_NAME}-nlx-inway:${APP_ENV}
# build:
# context: ./api
# target: api-nlx-inway
# depends_on:
# - nlx-postgres
# volumes:
# - ./api/nlx-setup:/certs:rw,cached
# environment:
# - DIRECTORY_REGISTRATION_ADDRESS=directory-registration-api.demo.nlx.io:443
# - SELF_ADDRESS=pc.zaakonline.nl:443
# - SERVICE_CONFIG=/service-config.toml
# - TLS_NLX_ROOT_CERT=/certs/root.crt
# - TLS_ORG_CERT=/certs/org.crt
# - TLS_ORG_KEY=/certs/org.key
# - POSTGRES_DSN=postgres://postgres:postgres@nlx-postgres/txlog-db?sslmode=disable&connect_timeout=10
# networks:
# - nlx
# Comment out this service in production if you do not want to use nlx
# nlx-postgres:
# image: postgres:12
# environment:
# POSTGRES_PASSWORD: postgres
# POSTGRES_DB: txlog-db
# POSTGRES_USER: postgres
# volumes:
# - nlx-data-2:/var/lib/postgresql/data:rw
# networks:
# - nlx
# Comment out this service in production if you do not want to use nlx
#txlog-db:
# image: nlxio/txlog-db
# depends_on:
# - nlx-postgres
# - nlx-outway
# If you us this docker-compose file for production enviroments and want to us nlx-inway uncomment the following lins
# - nlx-inway
# environment:
# PGHOST: nlx-postgres
# PGUSER: postgres
# PGPASSWORD: postgres
# PGDATABASE: txlog-db
# command: /usr/local/bin/upgrade-db.sh
# networks:
# - nlx
#db:
# image: postgres:10-alpine
# environment:
# - POSTGRES_DB=api
# - POSTGRES_USER=api-platform
# You should definitely change the password in production
# - POSTGRES_PASSWORD=!ChangeMe!
# volumes:
# - db-data:/var/lib/postgresql/data:rw
# From: https://hub.docker.com/r/phpdoc/phpdoc/
phpDocumentor:
image: phpdoc/phpdoc
helmPackage:
image: alpine/helm:3.2.1
volumes:
- ./api/helm:/apps
command: package /apps
helmIndex:
depends_on:
- helmPackage
image: alpine/helm:3.2.1
volumes:
- ./api/helm:/apps
command: repo index /apps
redis:
image: redis:4-alpine
# From: tsgkadot/docker-doxygen
sphinx:
image: tsgkadot/docker-doxygen
db:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=example
- MYSQL_DATABASE=api
- MYSQL_USER=api-platform
- MYSQL_PASSWORD=!ChangeMe!
volumes:
- db-mysql:/var/lib/mysql:rw
ports:
- "3366:3306"
networks:
nlx:
name: nlx
volumes:
db-data: {}
db-mysql: {}
nlx-data-2: {}