-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
154 lines (152 loc) · 4.76 KB
/
docker-compose.yml
File metadata and controls
154 lines (152 loc) · 4.76 KB
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
# docker-compose build
volumes:
postgis-data:
driver: local
cloudbeaver:
driver: local
onomap-data:
driver: local
geoserver-data:
driver: local
postgis-backup:
driver: local
duplicati-config:
driver: local
secrets:
postgis_pgbackrest_config:
file: ./pgbackrest.conf
services:
postgis:
# special image with pgbackrest installed
# to launch a backup run the following command
# docker compose exec -u postgres postgis pgbackrest --stanza=noisecapture backup
# to get the state of the backup
# docker compose exec -u postgres postgis pgbackrest info
# customize the pgbackrest.conf file in order to upload to distant S3 repository for safe backup
build:
context: ./onomap-postgis
restart: always
shm_size: 2g
environment:
PGBACKREST_CONFIGURATION_FILE: /run/secrets/postgis_pgbackrest_config
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-onomap}"
METABASE_PASSWORD: "${METABASE_PASSWORD:-metabase}"
POSTGRES_DB: noisecapture
healthcheck:
test: ["CMD-SHELL", "pg_isready -U onomap -d noisecapture"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- postgis-data:/var/lib/postgresql/data
- postgis-backup:/var/lib/pgbackrest
secrets:
- postgis_pgbackrest_config
deploy:
resources:
limits:
cpus: '4.0'
memory: 4G
cloudbeaver:
image: dbeaver/cloudbeaver:latest
depends_on:
postgis:
condition: service_healthy
restart: always
volumes:
- cloudbeaver:/opt/cloudbeaver/workspace
- ./onomap/cloudbeaver/conf:/opt/cloudbeaver/conf
environment:
CLOUDBEAVER_EXPIRE_SESSION_AFTER_PERIOD: 1800000
CLOUDBEAVER_ROOT_URI: /cloudbeaver/
CB_SERVER_URL: "${CB_SERVER_URL:-http://localhost:8080/cloudbeaver/}"
CB_ADMIN_NAME: "${CB_ADMIN_NAME:-cb_admin}"
CB_ADMIN_PASSWORD: "${CB_ADMIN_PASSWORD}"
CB_SERVER_NAME: "${CB_SERVER_NAME:-noisecapture}"
onomap:
build:
context: ./onomap
depends_on:
postgis:
condition: service_healthy
restart: always
ports:
- "8888:8888" # sensitive port do not expose on the web
volumes:
- onomap-data:/onomap/workspace/
environment:
POSTGRES_HOST: postgis
POSTGRES_DB: noisecapture
POSTGRES_USER: "${POSTGRES_USER:-onomap}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-onomap}"
workingDir: /onomap/workspace/
# Restrict to small dataset for test purposes (overload this env with .env file in production)
GADM_URI: "${GADM_URI:-https://github.com/Universite-Gustave-Eiffel/NoiseCapture/raw/refs/heads/onomapv2/onomap/src/test/resources/org/noise_planet/onomap/ut_deps.geojson}"
TIMEZONE_URI: "${TIMEZONE_URI:-https://github.com/Universite-Gustave-Eiffel/NoiseCapture/raw/refs/heads/onomapv2/onomap/src/test/resources/org/noise_planet/onomap/tz_world.shp}"
duplicati:
image: duplicati/duplicati
#depends_on:
# onomap:
# condition: service_started
environment:
PUID: 1001
PGID: 1001
TZ: Europe/Paris
volumes:
- onomap-data:/backup/onomap-data/
- postgis-backup:/backup/pgbackrest/
- duplicati-config:/data/
ports:
- "8200:8200" # Backup web interface, do not expose on the web
restart: always
geoserver:
build:
context: ./onomap-geoserver
args:
GS_DATA_PATH: data_dir
GEOSERVER_VERSION: 2.27.1
CORS_ENABLED: true
CORS_ALLOWED_METHODS: GET,POST,PUT,HEAD,OPTIONS
volumes:
- geoserver-data:/opt/
restart: always
environment:
GEOSERVER_ADMIN_PASSWORD: "${GEOSERVER_ADMIN_PASSWORD:-geoserver}"
GEOSERVER_ADMIN_USER: "${GEOSERVER_ADMIN_USER:-admin}"
POSTGRES_USER: "${POSTGRES_USER:-onomap}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-onomap}"
RUN_UNPRIVILEGED: true
ROOT_WEBAPP_REDIRECT: true
SKIP_DEMO_DATA: true
POSTGRES_PORT: 5432
GEOSERVER_CSRF_WHITELIST: "${GEOSERVER_CSRF_WHITELIST:-onomap-gs.noise-planet.org}"
PROXY_BASE_URL: "${PROXY_BASE_URL:-https://onomap-gs.noise-planet.org/geoserver/}"
metabase:
image: metabase/metabase:latest
restart: always
volumes:
- /dev/urandom:/dev/random:ro
environment:
MB_DB_TYPE: postgres
MB_DB_DBNAME: metabase
MB_DB_PORT: 5432
MB_DB_USER: metabase
MB_DB_PASS: "${METABASE_PASSWORD:-metabase}"
MB_DB_HOST: postgis
webmap:
depends_on:
onomap:
condition: service_started
build:
context: onomap-webmap
volumes:
- onomap-data:/onomap/workspace/
ports:
- "8080:80"
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s