-
Notifications
You must be signed in to change notification settings - Fork 28
/
services-base.yml
195 lines (187 loc) · 6.75 KB
/
services-base.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
version: '2.3'
services:
base-sormas:
restart: unless-stopped
image: hzibraunschweig/sormas-application:${SORMAS_DOCKER_VERSION}
environment:
- DB_JDBC_IDLE_TIMEOUT=${DB_JDBC_IDLE_TIMEOUT}
- 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_NAME=${DB_NAME}
- MAIL_HOST=${MAIL_HOST}
- SMTP_PORT=${SMTP_PORT}
- SMTP_USER=${SMTP_USER}
- SMTP_PASSWORD=${SMTP_PASSWORD}
- SMTP_STARTTLS=${SMTP_STARTTLS}
- SMTP_SSL=${SMTP_SSL}
- SMTP_ASYNC_SENDING=${SMTP_ASYNC_SENDING}
- SMTP_AUTH_ENABLED=${SMTP_AUTH_ENABLED}
- EMAIL_NOTIFICATION_ENABLED=${EMAIL_NOTIFICATION_ENABLED}
- LOG_SENDER_ADDRESS=${LOG_SENDER_ADDRESS}
- LOG_RECIPIENT_ADDRESS=${LOG_RECIPIENT_ADDRESS}
- LOG_SUBJECT=${LOG_SUBJECT}
- MAIL_FROM=${MAIL_FROM}
- SORMAS_VERSION=${SORMAS_VERSION}
- LOCALE=${LOCALE}
- COUNTRY_NAME=${COUNTRY_NAME}
- 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}
- GEO_TEMPLATE=${GEO_TEMPLATE}
- GEO_LONG_TEMPLATE=${GEO_LONG_TEMPLATE}
- GEO_LAT_TEMPLATE=${GEO_LAT_TEMPLATE}
- CREATE_DEFAULT_ENTITIES=${CREATE_DEFAULT_ENTITIES}
- AS_ADMIN_NEWPASSWORD=${AS_ADMIN_NEWPASSWORD}
- DC_EXCLUDE_ARCHIVED_PERSON_ENTRIES=${DC_EXCLUDE_ARCHIVED_PERSON_ENTRIES}
- MAP_USECOUNTRYCENTER=${MAP_USECOUNTRYCENTER}
- FEATURE_AUTOMATICCASECLASSIFICATION=${FEATURE_AUTOMATICCASECLASSIFICATION}
- GLOWROOT_ENABLED=${GLOWROOT_ENABLED}
- PD_TOKENLIFETIME=${PD_TOKENLIFETIME}
- MAP_TILES_URL=${MAP_TILES_URL}
- MAP_TILES_ATTRIBUTION=${MAP_TILES_ATTRIBUTION}
- ALLOWED_FILE_EXTENSIONS=${ALLOWED_FILE_EXTENSIONS}
mem_limit: ${APPSERVER_MEM}
mem_reservation: ${APPSERVER_MEM_RESERVED}
ports:
- "4000:4000"
base-postgres:
restart: unless-stopped
labels:
- autoheal=true
command: -c 'config_file=/etc/postgresql/postgresql.conf'
image: hzibraunschweig/sormas-postgres:${SORMAS_DOCKER_VERSION}
environment:
- POSTGRES_PASSWORD=${SORMAS_POSTGRES_PASSWORD}
- DB_NAME=${DB_NAME}
- SORMAS_POSTGRES_PASSWORD=${SORMAS_POSTGRES_PASSWORD}
- SORMAS_POSTGRES_USER=${SORMAS_POSTGRES_USER}
- TZ=${TZ}
mem_limit: ${DB_MEM}
mem_reservation: ${DB_MEM_RESERVED}
healthcheck:
test: ["CMD", "psql", "-U", "${SORMAS_POSTGRES_USER}", "-c", "SELECT 1;", "${DB_NAME}"]
interval: 30s
timeout: 3s
retries: 3
start_period: 30s
base-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}
cpus: ${KEYCLOAK_DB_CPUS}
mem_limit: ${KEYCLOAK_DB_MEM}
mem_reservation: ${KEYCLOAK_DB_MEM_RESERVED}
healthcheck:
test: [ "CMD", "psql", "-U", "${KEYCLOAK_DB_USER}", "-c", "SELECT 1;", "${KEYCLOAK_DB_NAME}" ]
interval: 30s
timeout: 3s
retries: 3
start_period: 30s
base-pg_dump:
restart: unless-stopped
image: hzibraunschweig/sormas-pg-dump:${SORMAS_DOCKER_VERSION}
environment:
- TZ=${TZ}
cpus: ${DB_DUMP_CPUS}
mem_limit: ${DB_DUMP_MEM}
mem_reservation: ${DB_DUMP_MEM_RESERVED}
base-apache2:
restart: unless-stopped
labels:
- autoheal=true
image: hzibraunschweig/sormas-apache2:${SORMAS_DOCKER_VERSION}
environment:
- SORMAS_SERVER_URL=${SORMAS_SERVER_URL}
- TZ=${TZ}
cpus: ${WEBSERVER_CPUS}
mem_limit: ${WEBSERVER_MEM}
mem_reservation: ${WEBSERVER_MEM_RESERVED}
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
base-autoheal:
restart: unless-stopped
image: willfarrell/autoheal:1.0.0
environment:
# watch all running containers.
- AUTOHEAL_CONTAINER_LABEL=all
# check every 10 seconds
- AUTOHEAL_INTERVAL=10
# Docker waits max 10 seconds (the Docker default) for a container to stop before killing
- AUTOHEAL_DEFAULT_STOP_TIMEOUT=10
# Unix socket for curl requests to Docker API
- DOCKER_SOCK=/var/run/docker.sock
# --max-time seconds for curl requests to Docker API
- CURL_TIMEOUT=30
base-letsencrypt:
restart: unless-stopped
image: hzibraunschweig/sormas-letsencrypt:${SORMAS_DOCKER_VERSION}
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
- URL=${SORMAS_SERVER_URL}
- EMAIL=${LETSENCRYPT_MAIL}
- DISABLE_CERTBOT=${DISABLE_CERTBOT}
- PROMETHEUS_SERVERS=${PROMETHEUS_SERVERS}
volumes:
- /var/lib/docker/letsencrypt-config:/config
- ./letsencrypt/certs:/config/etc/letsencrypt/live
ports:
- 443:443
- 80:80
cpus: ${WEBSERVER_CPUS}
mem_limit: ${WEBSERVER_MEM}
mem_reservation: ${WEBSERVER_MEM_RESERVED}
base-keycloak:
restart: unless-stopped
labels:
- autoheal=true
build:
context: keycloak
args:
- SORMAS_URL=${SORMAS_URL}
- SORMAS_VERSION=${SORMAS_VERSION}
environment:
- KC_HOSTNAME=${SORMAS_SERVER_URL}
- KEYCLOAK_ADMIN=${KEYCLOAK_ADMIN_USER}
- KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_ADMIN_PASSWORD}
- KC_DB_URL_HOST=${KEYCLOAK_DB_HOST}
- KC_DB_USERNAME=${KEYCLOAK_DB_USER}
- KC_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}
cpus: ${KEYCLOAK_CPUS}
mem_limit: ${KEYCLOAK_MEM}
mem_reservation: ${KEYCLOAK_MEM_RESERVED}
healthcheck:
test: ["CMD", "/opt/keycloak/bin/kcadm.sh", "config", "credentials", "--server", "http://localhost:8080/keycloak", "--realm", "master", "--user", "${KEYCLOAK_ADMIN_USER}", "--password", "${KEYCLOAK_ADMIN_PASSWORD}"]
interval: 30s
timeout: 3s
retries: 3
start_period: 300s