-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
203 lines (195 loc) · 6.86 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
version: '3.4'
services:
sormas-angular:
restart: always
build:
context: .
target: compile-image
entrypoint: /opt/ng/node_modules/.bin/ng serve --port 80 --host="0.0.0.0" --public-host="sormas-docker-test.com/sormas-angular/" --disable-host-check --poll
ports:
- 127.0.0.1:8200:80
extra_hosts:
- "sormas-docker-test.com:0.0.0.0"
networks:
- sormas
volumes:
- ./:/opt/ng
sormas:
ports:
- 127.0.0.1:8000:80
- 127.0.0.1:8100:6080
- 127.0.0.1:8110:6048
image: hzibraunschweig/sormas-application:${SORMAS_DOCKER_VERSION}
environment:
- SORMAS_POSTGRES_USER=${SORMAS_POSTGRES_USER}
- SORMAS_POSTGRES_PASSWORD=${SORMAS_POSTGRES_PASSWORD}
- SORMAS_SERVER_URL=${SORMAS_SERVER_URL}
- DB_HOST=${DB_HOST}
- DOMAIN_NAME=${DOMAIN_NAME}
- DB_JDBC_MAXPOOLSIZE=${DB_JDBC_MAXPOOLSIZE}
- DB_NAME=${DB_NAME}
- DB_NAME_AUDIT=${DB_NAME_AUDIT}
- MAIL_HOST=${MAIL_HOST}
- MAIL_FROM=${MAIL_FROM}
- SORMAS_VERSION=${SORMAS_VERSION}
- LOCALE=${LOCALE}
- EPIDPREFIX=${EPIDPREFIX}
- SEPARATOR=${SEPARATOR}
- EMAIL_SENDER_ADDRESS=${EMAIL_SENDER_ADDRESS}
- EMAIL_SENDER_NAME=${EMAIL_SENDER_NAME}
- LATITUDE=${LATITUDE}
- LONGITUDE=${LONGITUDE}
- MAP_ZOOM=${MAP_ZOOM}
- TZ=${TZ}
- JVM_MAX=${APPSERVER_JVM_MAX}
- GEO_UUID=${GEO_UUID}
- DEVMODE=${DEVMODE}
- JSON_LOGGING=${JSON_LOGGING}
- CUSTOMBRANDING_ENABLED=${CUSTOMBRANDING_ENABLED}
- CUSTOMBRANDING_NAME=${CUSTOMBRANDING_NAME}
- CUSTOMBRANDING_LOGO_PATH=${CUSTOMBRANDING_LOGO_PATH}
- CUSTOMBRANDING_USE_LOGINSIDEBAR=${CUSTOMBRANDING_USE_LOGINSIDEBAR}
- CUSTOMBRANDING_LOGINBACKGROUND_PATH=${CUSTOMBRANDING_LOGINBACKGROUND_PATH}
- GEO_TEMPLATE=${GEO_TEMPLATE}
- GEO_LONG_TEMPLATE=${GEO_LONG_TEMPLATE}
- GEO_LAT_TEMPLATE=${GEO_LAT_TEMPLATE}
- CASEARCHIVEDAYS=${CASEARCHIVEDAYS}
- EVENTARCHIVEDAYS=${EVENTARCHIVEDAYS}
- KEYCLOAK_USER=${KEYCLOAK_ADMIN_USER}
- KEYCLOAK_PASSWORD=${KEYCLOAK_ADMIN_PASSWORD}
- AUTHENTICATION_PROVIDER=KEYCLOAK
- CACERTS_PASS=${CACERTS_PASS}
- KEYSTORE_PASS=${KEYSTORE_PASS}
- KEYCLOAK_SORMAS_UI_SECRET=${KEYCLOAK_SORMAS_UI_SECRET}
- KEYCLOAK_SORMAS_REST_SECRET=${KEYCLOAK_SORMAS_REST_SECRET}
- KEYCLOAK_SORMAS_BACKEND_SECRET=${KEYCLOAK_SORMAS_BACKEND_SECRET}
extra_hosts:
# - sormas-docker-test.com:host.docker.internal
- sormas-docker-test.com:172.17.0.1
volumes:
# If you wish to run a custom .war for the sormas-rest, please use the below line as an example and change
# the path `./sormas-rest/sormas-rest.war` to the one to the .war file you wish to use,
# the same goes for sormas-ui and sormas-ear
# After the project fully starts you will need to run:
# docker exec sormas-angular_sormas_1 /opt/payara5/bin/asadmin --port 6048 deploy --force /opt/domains/sormas/deployments/sormas-rest.war
- ./sormas-rest/sormas-rest.war:/opt/domains/sormas/deployments/sormas-rest.war
- ./sormas-rest/sormas-ui.war:/opt/domains/sormas/deployments/sormas-ui.war
- ./sormas-rest/sormas-ear.ear:/opt/domains/sormas/deployments/sormas-ear.ear
- ./sormas-rest/sormas-ui.war:/opt/domains/sormas/autodeploy/sormas-ui.war
- ./sormas-rest/sormas-rest.war:/opt/domains/sormas/autodeploy/sormas-rest.war
- ./sormas-rest/sormas-ear.ear:/opt/domains/sormas/autodeploy/sormas-ear.ear
- ./docker/certs:/tmp/certs
healthcheck:
test: ["CMD", "curl", "-f", "-I", "http://localhost:6080/sormas-ui/login"]
interval: 30s
timeout: 7s
retries: 3
start_period: 300s
networks:
- sormas
depends_on:
- postgres
- keycloak
postgres:
command: -c 'config_file=/etc/postgresql/postgresql.conf'
build:
context: docker/postgres
image: sormas-postgres
environment:
- POSTGRES_PASSWORD=${SORMAS_POSTGRES_PASSWORD}
- DB_NAME=sormas
- DB_NAME_AUDIT=sormas_audit
- SORMAS_POSTGRES_PASSWORD=${SORMAS_POSTGRES_PASSWORD}
- SORMAS_POSTGRES_USER=${SORMAS_POSTGRES_USER}
- TZ=${TZ}
volumes:
- postgres:/var/lib/postgresql/data
- ./docker/postgres/psql.conf:/etc/postgresql/postgresql.conf
ports:
- 127.0.0.1:8300:5432
healthcheck:
test: ["CMD", "psql", "-U", "${SORMAS_POSTGRES_USER}", "-c", "SELECT 1;", "${DB_NAME}"]
interval: 30s
timeout: 3s
retries: 3
start_period: 30s
networks:
- sormas
keycloak:
ports:
- 127.0.0.1:8400:8080
image: hzibraunschweig/sormas-keycloak:${SORMAS_DOCKER_VERSION}
environment:
- KEYCLOAK_USER=${KEYCLOAK_ADMIN_USER}
- KEYCLOAK_PASSWORD=${KEYCLOAK_ADMIN_PASSWORD}
- DB_VENDOR=${KEYCLOAK_DB_VENDOR}
- DB_DATABASE=${KEYCLOAK_DB_NAME}
- DB_ADDR=${KEYCLOAK_DB_HOST}
- DB_USER=${KEYCLOAK_DB_USER}
- DB_PASSWORD=${KEYCLOAK_DB_PASSWORD}
- PROXY_ADDRESS_FORWARDING=true
- SORMAS_SERVER_URL=${SORMAS_SERVER_URL}
- KEYCLOAK_SORMAS_UI_SECRET=${KEYCLOAK_SORMAS_UI_SECRET}
- KEYCLOAK_SORMAS_REST_SECRET=${KEYCLOAK_SORMAS_REST_SECRET}
- KEYCLOAK_SORMAS_BACKEND_SECRET=${KEYCLOAK_SORMAS_BACKEND_SECRET}
healthcheck:
test: ["CMD", "curl", "-f", "-I", "http://localhost:8080/keycloak/auth/realms/master"]
interval: 30s
timeout: 3s
retries: 3
start_period: 300s
networks:
- sormas
depends_on:
- keycloak-postgres
keycloak-postgres:
restart: unless-stopped
labels:
- autoheal=true
command: -c 'config_file=/etc/postgresql/postgresql.conf'
image: hzibraunschweig/keycloak-postgres:${SORMAS_DOCKER_VERSION}
environment:
- POSTGRES_PASSWORD=${KEYCLOAK_DB_PASSWORD}
- POSTGRES_USER=${KEYCLOAK_DB_USER}
- POSTGRES_DB=${KEYCLOAK_DB_NAME}
- TZ=${TZ}
volumes:
- keycloak-postgres:/var/lib/postgresql/data
ports:
- 8401:5432
networks:
- sormas
healthcheck:
test: ["CMD", "psql", "-U", "${KEYCLOAK_DB_USER}", "-c", "SELECT 1;", "${KEYCLOAK_DB_NAME}"]
interval: 30s
timeout: 3s
retries: 3
start_period: 30s
apache2:
restart: unless-stopped
image: hzibraunschweig/sormas-apache2:${SORMAS_DOCKER_VERSION}
environment:
- SORMAS_SERVER_URL=${SORMAS_SERVER_URL}
- TZ=${TZ}
- PROMETHEUS_SERVERS=${PROMETHEUS_SERVERS}
volumes:
- ./docker/apache/vhost.conf.sh:/tmp/vhost.conf.sh
- ./docker/certs:/usr/local/apache2/certs
ports:
- 443:443
- 80:80
networks:
- sormas
healthcheck:
test: ["CMD", "curl", "-f", "-I", "-k", "--resolve", "${SORMAS_SERVER_URL}:443:127.0.0.1", "https://${SORMAS_SERVER_URL}/downloads/"]
interval: 30s
timeout: 3s
retries: 3
start_period: 30s
depends_on:
- sormas
volumes:
postgres:
keycloak-postgres:
networks:
sormas: