generated from ConductionNL/Proto-component-commonground
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
237 lines (220 loc) · 7.31 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
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:/srv/api: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}
#- 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_CONTAINER=${APP_CONTAINER}
- APP_DEBUG=${APP_DEBUG}
- APP_CACHE=${APP_CACHE}
- APP_VERSION=${APP_VERSION}
- APP_NAME=${APP_NAME}
- APP_NAME_TECHNICAL=${APP_NAME_TECHNICAL}
- 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_DESCRIPTION=${APP_DESCRIPTION}
- APP_LOGO=${APP_LOGO}
- APP_HOME=${APP_HOME}
- APP_COMMONGROUND_ID=${APP_COMMONGROUND_ID}
- APP_APPLICATION_KEY=${APP_APPLICATION_KEY}
- APP_BUILD_ALL_FIXTURES=${APP_BUILD_ALL_FIXTURES}
- APP_WEB=${APP_WEB}
- APP_BUILD=${APP_BUILD}
- APP_INTERNAL=${APP_INTERNAL}
- APP_URL=${APP_URL}
- APP_CHART=${APP_CHART}
- HELM_REPOSITORY=${HELM_REPOSITORY}
- ARTIFACTHUB_ID=${ARTIFACTHUB_ID}
- ARTIFACTHUB_USER=${ARTIFACTHUB_USER}
- OWNER_NAME=${OWNER_NAME}
- OWNER_URL=${OWNER_URL}
- APP_SESSION_DURATION=${APP_SESSION_DURATION}
- LICENCE_NAME=${LICENCE_NAME}
- TRUSTED_PROXIES=${TRUSTED_PROXIES}
- TRUSTED_HOSTS=${TRUSTED_HOSTS}
- AUTH_ENABLED=${AUTH_ENABLED}
- AUDITTRAIL_ENABLED=${AUDITTRAIL_ENABLED}
- NOTIFICATION_ENABLED=${NOTIFICATION_ENABLED}
- 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: {}