This repository has been archived by the owner on Dec 21, 2021. It is now read-only.
forked from SORMAS-Foundation/SORMAS-Docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-sb.yml
145 lines (140 loc) · 4.69 KB
/
docker-compose-sb.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
version: '2.3'
networks:
sormas:
name: sormas
services:
sormas:
restart: unless-stopped
labels:
- autoheal=true
# override for stop timeout seconds during restart
- autoheal.stop.timeout=30
links:
- postgres
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}
- 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}
- 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}
- PIA_URL=${PIA_URL}
- SJ_URL=https://${PIA_URL}/user/connectSormas
- SJ_AUTH=https://${PIA_URL}/user/requestToken
- SJ_CLIENTID=${SJ_CLIENTID}
- SJ_SECRET=${SJ_SECRET}
- SJ_DEFAULT_USERNAME=${SJ_DEFAULT_USERNAME}
- SJ_DEFAULT_PASSWORD=${SJ_DEFAULT_PASSWORD}
volumes:
- ${SORMAS_PATH}/documents:/opt/sormas/documents
- ${SORMAS_PATH}/custom:/opt/sormas/custom
- ${SORMAS_PATH}/sormas2sormas:/opt/sormas/sormas2sormas
- ${SORMAS_PATH}/sormas-logs:/opt/domains/sormas/logs
mem_limit: ${APPSERVER_MEM}
mem_reservation: ${APPSERVER_MEM_RESERVED}
healthcheck:
test: ["CMD", "curl", "-f", "-I", "http://localhost:6080/sormas-ui/login"]
interval: 30s
timeout: 7s
retries: 3
start_period: 300s
depends_on:
postgres:
condition: service_healthy
networks:
sormas:
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=sormas
- DB_NAME_AUDIT=sormas_audit
- SORMAS_POSTGRES_PASSWORD=${SORMAS_POSTGRES_PASSWORD}
- SORMAS_POSTGRES_USER=${SORMAS_POSTGRES_USER}
- TZ=${TZ}
volumes:
- ${SORMAS_PATH}/psqldata:/var/lib/postgresql/data
ports:
- "5432:5432"
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
networks:
sormas:
pg_dump:
restart: unless-stopped
image: hzibraunschweig/sormas-pg-dump:${SORMAS_DOCKER_VERSION}
environment:
- DB_HOST=${DB_HOST}
- DB_NAME=sormas
- DB_NAME_AUDIT=sormas_audit
- PGPASSWORD=${SORMAS_POSTGRES_PASSWORD}
- SORMAS_POSTGRES_USER=${SORMAS_POSTGRES_USER}
- TZ=${TZ}
volumes:
- /backup:/var/opt/db_dumps
cpus: ${DB_DUMP_CPUS}
mem_limit: ${DB_DUMP_MEM}
mem_reservation: ${DB_DUMP_MEM_RESERVED}
depends_on:
postgres:
condition: service_healthy
networks:
sormas:
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
# wait 0 seconds before first health check
- AUTOHEAL_START_PERIOD=600
# 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
volumes:
- /var/run/docker.sock:/var/run/docker.sock