-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
249 lines (232 loc) · 6.08 KB
/
docker-compose.yaml
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
networks:
default:
qnetwork:
volumes:
geoshop-files:
zitadel-files:
services:
# Frontend
frontend:
build: ./frontend
depends_on:
geoshop:
condition: service_healthy
extract:
condition: service_healthy
geoshop_fe:
condition: service_healthy
environment:
- FRONTEND_HOST=${FRONTEND_HOST:-localhost}
- FRONTEND_PORT=${FRONTEND_PORT:-8080}
- GEOSHOP_BACKEND=http://geoshop:8000
- EXTRACT_FRONTEND=http://extract:8080
volumes:
- geoshop-files:/geoshop/media/
ports:
- "8080:80"
healthcheck:
test: ( curl -L --fail http://localhost/extract | grep '<title>Extract</title>' && curl -L --fail http://localhost/geoshop ) || exit 1
interval: 10s
timeout: 10s
retries: 15
# Extract
extract:
build: ./extract
depends_on:
pgsql:
condition: service_healthy
geodata:
condition: service_healthy
environment:
- JAVA_OPTS=-Xms1G -Xmx2G
-Duser.language=en -Duser.region=CH -Dcom.sun.jndi.ldap.connect.pool.timeout=20000
- ENCRYPTION_SECRET=12345678901234567890123456789012
- ENCRYPTION_SALT=12345678901234567890123456789012
- EXTERNAL_URL=http://localhost:8080/extract/
healthcheck:
test: curl -L --fail http://localhost:8080/extract || exit 1
interval: 10s
timeout: 10s
retries: 15
# Extract/Postgres
pgsql:
image: postgis/postgis:14-3.2-alpine
environment:
- POSTGRES_DB=extract
- POSTGRES_USER=extractuser
- POSTGRES_PASSWORD=demopassword
healthcheck:
test: ["CMD-SHELL", "pg_isready -U extractuser -d postgres"]
interval: 5s
timeout: 5s
retries: 5
# Extract/Postgis
geodata:
image: postgis/postgis:14-3.2-alpine
environment:
- POSTGRES_DB=geodata
- POSTGRES_USER=extractuser
- POSTGRES_PASSWORD=demopassword
ports:
- "54320:5432"
volumes:
- ./extract/geodata:/docker-entrypoint-initdb.d/
healthcheck:
test: ["CMD-SHELL", "pg_isready -U extractuser -d postgres"]
interval: 5s
timeout: 5s
retries: 5
# Extract/Updatedb
updatedb:
image: postgis/postgis:14-3.2-alpine
depends_on:
extract:
condition: service_healthy
environment:
- PGHOST=pgsql
- PGDB=extract
- PGUSER=extractuser
- PGPASSWORD=demopassword
- GEOSHOP_BACKEND=http://geoshop:8000
volumes:
- ./updatedb:/updatedb
entrypoint: /updatedb/update.sh
# Geoshop
geoshop:
build: ./geoshop/back
depends_on:
postgis:
condition: service_healthy
env_file: ./geoshop/${TEST_MODE+test}.env
volumes:
- geoshop-files:/geoshop/files
- zitadel-files:/zitadel-files
healthcheck:
test: curl -L --fail http://localhost:8000 || exit 1
interval: 10s
timeout: 10s
retries: 15
# Geoshop Front End
# TODO: use env variables for the backend url and port
geoshop_fe:
build: ./geoshop/front
depends_on:
geoshop:
condition: service_healthy
healthcheck:
test: curl -L --fail http://geoshop_fe/ || exit 1
interval: 10s
timeout: 10s
retries: 15
# Geoshop/Postgis
postgis:
image: postgis/postgis:14-3.2-alpine
volumes:
- ./geoshop/resources/ini-scripts:/docker-entrypoint-initdb.d/:ro
- ./geoshop/resources/postgis_data:/var/lib/postgresql/data:rw
environment:
LANG: "en_US.utf8"
LC_COLLATE: "en_US.utf8"
LC_CTYPE: "en_US.utf8"
env_file: ./geoshop/.env
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U geoshop"]
interval: 5s
timeout: 5s
retries: 5
# Mailhog
mailhog:
image: mailhog/mailhog
tty: true
ports:
- "1025:1025"
- "8025:8025"
volumes:
- ./mailhog:/home/mailhog/conf
entrypoint: MailHog -auth-file=/home/mailhog/conf/auth-users
# LDAP
openldap:
image: osixia/openldap:1.5.0
environment:
- LDAP_ORGANISATION=Extract
- LDAP_DOMAIN=extract.org
- LDAP_ADMIN_PASSWORD=extract
- LDAP_CONFIG_PASSWORD=extract
- LDAP_RFC2307BIS_SCHEMA=true
- LDAP_REMOVE_CONFIG_AFTER_SETUP=true
- LDAP_TLS_VERIFY_CLIENT=try
ports:
- "389:389"
- "636:636"
ldap-ad:
build: ./ldap-ad
volumes:
- ./ldap-ad/users.ldif:/ldap/users.ldif
ports:
- "10389:10389"
# QGIS
qgisserver:
image: camptocamp/qgis-server
volumes:
- ./qgis/project:/etc/qgisserver
environment:
- QGIS_PROJECT_FILE=/etc/qgisserver/world.qgs
- QGIS_SERVER_LANDING_PAGE_PROJECTS_DIRECTORIES=/etc/qgisserver
networks:
- qnetwork
qgisproxy:
depends_on:
qgisserver:
condition: service_started
build:
context: ./qgis
hostname: qgisproxy
container_name: qgisproxy
volumes:
- ./qgis/nginx.conf:/etc/nginx/nginx/conf:ro
ports:
- 8888:80
networks:
- qnetwork
- default
test:
profiles: [testing]
build: ./tests
environment:
- GEOSHOP_DEMO_LOGIN=${GEOSHOP_DEMO_LOGIN}
- EXTRACT_DEMO_LOGIN=${EXTRACT_DEMO_LOGIN}
- ZITADEL_DEMO_LOGIN=${ZITADEL_DEMO_LOGIN}
- TEST_OUTPUT=${TEST_OUTPUT:-/test_output/}
volumes:
- ./test_output:${TEST_OUTPUT:-/test_output/}
depends_on:
selenium:
condition: service_healthy
frontend:
condition: service_healthy
zitadel:
condition: service_started
selenium:
profiles: [testing]
image: selenium/standalone-firefox
ports:
- 5900:5900
healthcheck:
test: curl --fail http://localhost:4444/ || exit 1
interval: 10s
timeout: 10s
retries: 15
zitadel:
build: zitadel
volumes:
- zitadel-files:/zitadel/files
ports:
- 9998:9998
environment:
- PORT=9998
- USERS_FILE=/zitadel/users.json
- ISSUER=http://zitadel:9998
- DEV_MODE=true
- REDIRECT_URI=http://frontend/geoshop/oidc/callback,https://frontend:80/geoshop/oidc/callback,http://frontend:80/geoshop/oidc/callback,http://frontend/geoshop/auth/oidc