forked from 3liz/lizmap-docker-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
224 lines (222 loc) · 10 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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
version: '3.9'
services:
lizmap:
image: 3liz/lizmap-web-client:${LIZMAP_VERSION_TAG}
container_name: lizmap
environment:
LIZMAP_CACHEREDISDB: '0'
LIZMAP_CACHEREDISHOST: 'redis'
LIZMAP_CACHESTORAGETYPE: redis
LIZMAP_CACHEEXPIRATION: '0'
LIZMAP_CACHEREDISKEYPREFIX: 'lizmap_'
LIZMAP_HOME: /srv/lizmap
LIZMAP_USER: ${LIZMAP_UID}
LIZMAP_WMSSERVERURL: http://map:8080/ows/
LIZMAP_CONFIG_INCLUDE: /srv/etc
PGSERVICEFILE: /srv/etc/pg_service.conf
PGPASSFILE: /srv/etc/pgpass
PM_MAX_CHILDREN: '400'
PM_START_SERVERS: '8'
PM_MIN_SPARE_SERVERS: '8'
PM_MAX_SPARE_SERVERS: '64'
PM_CHILD_PROCESS: 'dynamic'
PM_MAX_REQUESTS: '0'
PM_PROCESS_IDLE_TIMEOUT: '10'
volumes:
- { type: bind, source: "${LIZMAP_PROJECTS}", target: /srv/projects }
- { type: bind, source: "${LIZMAP_DIR}/var/lizmap-theme-config", target: /www/lizmap/var/lizmap-theme-config }
- { type: bind, source: "${LIZMAP_DIR}/var/lizmap-config", target: /www/lizmap/var/config }
- { type: bind, source: "${LIZMAP_DIR}/var/lizmap-db", target: /www/lizmap/var/db }
- { type: bind, source: "${LIZMAP_DIR}/www", target: /www/lizmap/www }
- { type: bind, source: "${LIZMAP_DIR}/www/var/log", target: /www/lizmap/var/log }
- { type: bind, source: "${LIZMAP_DIR}/var/lizmap-modules", target: /www/lizmap/lizmap-modules }
- { type: bind, source: "${LIZMAP_DIR}/var/lizmap-my-packages", target: /www/lizmap/my-packages }
- { type: bind, source: "${LIZMAP_DIR}/etc", target: /srv/etc, read_only: true }
- { type: bind, source: "${LIZMAP_DIR}/etc/php_customconfig.ini", target: /etc/php7/conf.d/php_customconfig.ini }
- { type: bind, source: "${LIZMAP_DIR}/../../lizmap-altiProfil/altiProfil", target: /www/lizmap/lizmap-modules/altiProfil }
- { type: bind, source: "${LIZMAP_DIR}/../../lizmap-altiProfil/altiProfilAdmin", target: /www/lizmap/lizmap-modules/altiProfilAdmin }
- { type: bind, source: "${LIZMAP_DIR}/../../lizmap-wps-web-client-module/wps", target: /www/lizmap/lizmap-modules/wps }
- { type: bind, source: "/etc/localtime", target: /etc/localtime, read_only: true }
- { type: bind, source: "/etc/timezone", target: /etc/timezone, read_only: true }
- { type: bind, source: "${ATDI_ATTACH}", target: /srv/projects/media/doc }
command:
- php-fpm
depends_on:
postgis:
condition: service_healthy
restart: unless-stopped
map:
image: 3liz/qgis-map-server:${QGIS_VERSION_TAG}
container_name: map
environment:
PGSERVICEFILE: /srv/etc/pg_service.conf
PGSPASSFILE: /srv/etc/pgpass.conf
QGIS_OPTIONS_PATH: /srv/etc/qgis
QGIS_SERVER_LIZMAP_REVEAL_SETTINGS: 'yes'
QGSRV_API_ENABLED_LIZMAP: 'yes'
QGSRV_CACHE_SIZE: '20'
QGSRV_CACHE_STRICT_CHECK: 'no'
QGSRV_CACHE_ROOTDIR: /srv/projects
QGSRV_LOGGING_LEVEL: INFO
QGSRV_USER: ${LIZMAP_UID}:${LIZMAP_GID}
QGSRV_SERVER_PLUGINPATH: /srv/plugins
QGSRV_CACHE_PRELOAD_CONFIG: /srv/projects/projects.conf
QGSRV_SERVER_WORKERS: ${QGIS_MAP_WORKERS}
QGSRV_DISABLE_GETPRINT: 'yes'
QGSRV_TRUST_LAYER_METADATA: 'yes'
QGSRV_CACHE_CHECK_INTERVAL: '60'
QGSRV_SERVER_TIMEOUT: '40'
QGSRV_SERVER_RESTARTMON: /srv/projects/qgis-restart.txt
QGSRV_DISPLAY_XVFB: 'OFF'
QGIS_SERVER_PARALLEL_RENDERING: '1'
QGIS_PLUGIN_MANAGER_SOURCES_FILE: /tmp/sources.list
QGIS_PLUGIN_MANAGER_CACHE_DIR: /srv/plugins
QGIS_PLUGIN_MANAGER_RESTART_FILE: /srv/projects/qgis-restart.txt
volumes:
- { type: bind, source: "${LIZMAP_PROJECTS}", target: /srv/projects }
- { type: bind, source: "${LIZMAP_DIR}/wps-data", target: /srv/data }
- { type: bind, source: "${LIZMAP_DIR}/etc", target: /srv/etc }
- { type: bind, source: "/etc/localtime", target: /etc/localtime, read_only: true }
- { type: bind, source: "/etc/timezone", target: /etc/timezone, read_only: true }
ports:
- ${OWS_PORT}:8080
restart: unless-stopped
depends_on:
postgis:
condition: service_healthy
redis:
image: redis:7-alpine
container_name: redis
ports:
- 6379:6379
volumes:
- { type: volume, source: redis_data, target: /data }
- { type: bind, source: "/etc/localtime", target: /etc/localtime, read_only: true }
- { type: bind, source: "/etc/timezone", target: /etc/timezone, read_only: true }
restart: unless-stopped
web:
image: nginx:alpine
container_name: web
# user: ${LIZMAP_UID}:${LIZMAP_UID}
volumes:
- { type: bind, source: "${LIZMAP_DIR}/etc/nginx.conf", target: /etc/nginx/nginx.conf }
- { type: bind, source: "${LIZMAP_DIR}/var/log/nginx", target: /var/log/nginx }
- { type: bind, source: "${LIZMAP_DIR}/var/nginx-cache", target: /var/cache/nginx }
- { type: bind, source: "${LIZMAP_DIR}", target: /srv/lizmap }
- { type: bind, source: "${LIZMAP_DIR}/etc/self-signed.conf", target: /etc/nginx/self-signed.conf }
- { type: bind, source: "${LIZMAP_DIR}/etc/ssl-params.conf", target: /etc/nginx/ssl-params.conf }
- { type: bind, source: "${LIZMAP_DIR}/etc/nginx-selfsigned.crt", target: /etc/nginx/nginx-selfsigned.crt }
- { type: bind, source: "${LIZMAP_DIR}/etc/nginx-selfsigned.key", target: /etc/nginx/nginx-selfsigned.key }
- { type: bind, source: "${LIZMAP_DIR}/etc/dhparam.pem", target: /etc/nginx/dhparam.pem }
- { type: bind, source: "/etc/localtime", target: /etc/localtime, read_only: true }
- { type: bind, source: "/etc/timezone", target: /etc/timezone, read_only: true }
ports:
- ${LIZMAP_PORT}:8080
- ${LIZMAP_HTTPS_PORT}:443
depends_on:
- lizmap
restart: unless-stopped
postgis:
image: ${POSTGIS_IMAGE}
container_name: postgis
volumes:
- { type: volume, source: postgis_data, target: /var/lib/postgresql/data }
# - { type: bind, source: "${LIZMAP_DIR}/etc/postgres.init.d", target: /docker-entrypoint-initdb.d }
- { type: bind, source: "/etc/localtime", target: /etc/localtime, read_only: true }
- { type: bind, source: "/etc/timezone", target: /etc/timezone, read_only: true }
- { type: bind, source: "${LIZMAP_DIR}/../../OneDrive/Bazele de date mobil-celular/celule", target: /home/nqdi/mobil-celular }
- { type: bind, source: "${LIZMAP_DIR}/etc", target: /srv/etc, read_only: true }
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
PGSERVICEFILE: /srv/etc/pg_service.conf
PGSPASSFILE: /srv/etc/pgpass
LANG: en_US.utf8
LC_COLLATE: C
TZ: Europe/Chisinau
ports:
- ${POSTGIS_PORT}:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d ${POSTGRES_DB} -q || exit 1"]
interval: 10s
timeout: 5s
start_period: 60s
networks:
default:
restart: unless-stopped
postfix:
image: juanluisbaptiste/postfix:latest
container_name: postfix
environment:
SMTP_SERVER: ${POSTFIX_SMTP_SERVER}
SMTP_PORT : ${POSTFIX_SMTP_PORT}
SMTP_USERNAME_FILE: /secret/mail_username.conf
SMTP_PASSWORD_FILE: /secret/mail_password.conf
SERVER_HOSTNAME: ${POSTFIX_SERVER_HOSTNAME}
SMTP_NETWORKS: ${POSTFIX_SMTP_NETWORKS}
# OVERWRITE_FROM: ${POSTFIX_OVERWRITE_FROM}
DEBUG: 'no'
restart: unless-stopped
volumes:
- { type: bind, source: "/etc/localtime", target: /etc/localtime, read_only: true }
- { type: bind, source: "/etc/timezone", target: /etc/timezone, read_only: true }
- { type: bind, source: "${LIZMAP_DIR}/instances/mail_username.conf", target: /secret/mail_username.conf }
- { type: bind, source: "${LIZMAP_DIR}/instances/mail_password.conf", target: /secret/mail_password.conf }
ports:
- 25:25
wps:
image: 3liz/qgis-wps:ltr-rc
container_name: wps
environment:
QGSWPS_SERVER_WORKDIR: /srv/data
QGSWPS_SERVER_PARALLELPROCESSES: '2'
QGSWPS_SERVER_LOGSTORAGE: redis
QGSWPS_REDIS_HOST: 'redis'
QGSWPS_LOGLEVEL: DEBUG
QGSWPS_SERVER_WMS_SERVICE_URL:
QGSWPS_PROCESSING_PROVIDERS: provider1,provider2
QGSWPS_PROCESSING_PROVIDERS_MODULE_PATH: /processing
QGSWPS_CACHE_ROOTDIR: /srv/projects
QGSWPS_USER: ${LIZMAP_UID}:${LIZMAP_GID}
volumes:
- { type: bind, source: "${LIZMAP_PROJECTS}/processing", target: /processing }
- { type: bind, source: "${LIZMAP_PROJECTS}", target: /srv/projects }
- { type: bind, source: "${LIZMAP_DIR}/wps-data", target: /srv/data }
- { type: bind, source: "/etc/localtime", target: /etc/localtime, read_only: true }
- { type: bind, source: "/etc/timezone", target: /etc/timezone, read_only: true }
ports:
- ${WPS_PORT}:8080
restart: unless-stopped
pgagent:
image: pgagent:latest
container_name: pgagent
entrypoint: /bin/sh -c
"tmp/wait-for-it.sh postgis:5432 --timeout=30 &&
PGPASSWORD=${POSTGRES_PASSWORD} pgagent -f host=postgis dbname=postgres user=postgres port=${POSTGIS_PORT}"
volumes:
- { type: bind, source: "/etc/localtime", target: /etc/localtime, read_only: true }
- { type: bind, source: "/etc/timezone", target: /etc/timezone, read_only: true }
restart: unless-stopped
depends_on:
postgis:
condition: service_healthy
docker_container:
image: docker:latest
command: sh /home/nqdi/lizmap-docker-compose/docker_container_entrypoint.sh
container_name: docker_container
restart: unless-stopped
volumes:
- { type: bind, source: "${LIZMAP_PROJECTS}/docker_container_entrypoint.sh", target: /home/nqdi/lizmap-docker-compose/docker_container_entrypoint.sh }
- { type: bind, source: "/var/run/docker.sock", target: /var/run/docker.sock }
- { type: bind, source: "/etc/localtime", target: /etc/localtime, read_only: true }
- { type: bind, source: "/etc/timezone", target: /etc/timezone, read_only: true }
depends_on:
- map
volumes:
postgis_data:
driver: local
redis_data:
driver: local
networks:
default:
external: true
name: qgis-server