forked from kartoza/geodata-mart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
196 lines (180 loc) · 5 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
version: "3"
# Common Django template for GeoNode and Celery services below
x-common-django:
&default-common-django
image: ${COMPOSE_PROJECT_NAME}_django
restart: on-failure
env_file:
- .env
volumes:
- .:/app:z
- ./geodata:/qgis:z
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
minio-init:
condition: service_started
mailhog:
condition: service_started
qgis:
condition: service_healthy
services:
mailhog:
image: mailhog/mailhog:v1.0.0
container_name: mailhog
ports:
- "${MAILHOG_PORT}:8025"
django:
<< : *default-common-django
build:
context: .
dockerfile: ./docker/dev/Dockerfile
container_name: django4${COMPOSE_PROJECT_NAME}
platform: linux/x86_64
restart: on-failure
ports:
- "${DJANGO_PORT}:8000"
- "9999:9999"
command: /start
postgres:
image: kartoza/postgis:${POSTGRES_MAJOR_VERSION}-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_RELEASE}
volumes:
- db-data:/var/lib/postgresql
- db-backups:/backups
env_file:
- .env
ports:
- "5432"
restart: on-failure
healthcheck:
test: "PGPASSWORD=${POSTGRES_PASS} pg_isready -h 127.0.0.1 -U ${POSTGRES_USER} -d ${POSTGRES_PASS}"
qgis:
image: 3liz/qgis-map-server:3.28
environment:
- QGSRV_SERVER_WORKERS=6
- QGSRV_LOGGING_LEVEL=DEBUG
- QGSRV_CACHE_ROOTDIR=/qgis
- QGSRV_CACHE_SIZE=100
- QGSRV_SERVER_TIMEOUT=300
- QGSRV_LANDING_PAGE=yes
- QGSRV_CACHE_STRICT_CHECK=no
#- QGSRV_CACHE_DEFAULT_HANDLER=filesystem
- QGSRV_API_ENABLED_LANDING_PAGE=yes
- QGIS_SERVER_TRUST_LAYER_METADATA=yes
- QGIS_SERVER_PARALLEL_RENDERING=1
- QGIS_SERVER_MAX_THREADS=-1
- QGIS_SERVER_LANDING_PAGE_PROJECTS_DIRECTORIES=/qgis
- QGIS_SERVER_IGNORE_BAD_LAYERS=1
- QGIS_SERVER_DISABLE_GETPRINT=false
- QGIS_PROJECT_FILE=
- PGSERVICEFILE=/qgis/seed/pg_service.conf
volumes:
- ./geodata:/qgis
ports:
- "8080"
restart: on-failure
healthcheck:
test: "curl --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null http://localhost:8080/ows/?map=seed/ngi.qgs&SERVICE=WMS&REQUEST=GetCapabilities"
interval: 1m30s
timeout: 10s
retries: 3
dbbackups:
image: kartoza/pg-backup:${POSTGRES_MAJOR_VERSION}-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_RELEASE}
hostname: pg-backups
volumes:
- db-backups:/backups
environment:
- DUMPPREFIX=PG_db
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASS=${POSTGRES_PASS}
- POSTGRES_PORT=${POSTGRES_SERVICE_PORT}
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_DBNAME=${POSTGRES_DB}
- REMOVE_BEFORE=30
restart: on-failure
depends_on:
postgres:
condition: service_healthy
redis:
image: redis:6
container_name: redis
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 1s
timeout: 3s
retries: 5
restart: on-failure
celeryworker:
<< : *default-common-django
image: ${COMPOSE_PROJECT_NAME}_django
container_name: celeryworker${COMPOSE_PROJECT_NAME}
ports: []
restart: on-failure
command: /start-celeryworker
celerybeat:
<< : *default-common-django
image: ${COMPOSE_PROJECT_NAME}_django
container_name: celerybeat${COMPOSE_PROJECT_NAME}
ports: []
command: /start-celerybeat
restart: unless-stopped
flower:
<<: *default-common-django
image: ${COMPOSE_PROJECT_NAME}_django
container_name: flower${COMPOSE_PROJECT_NAME}
restart: on-failure
depends_on:
- celerybeat
ports:
- "${FLOWER_PORT}:${FLOWER_PORT}"
command: /start-flower
minio:
image: quay.io/minio/minio
environment:
- MINIO_ROOT_USER=${DJANGO_AWS_ACCESS_KEY_ID}
- MINIO_ROOT_PASSWORD=${DJANGO_AWS_SECRET_ACCESS_KEY}
entrypoint: /bin/bash
command: -c 'minio server /data --console-address ":9001"'
volumes:
- minio-data:/data
ports:
- "${MINIO_API_PORT}:9000"
- "${MINIO_CONSOLE_PORT}:9001"
healthcheck:
test: "curl -I http://localhost:9000/minio/health/live"
restart: on-failure
docs:
image: docs
container_name: docs
platform: linux/x86_64
build:
context: .
dockerfile: ./docker/docs/Dockerfile
env_file:
- .env
volumes:
- ./docs:/docs:z
- ./config:/app/config:z
- ./geodata_mart:/app/geodata_mart:z
ports:
- "${DOCS_PORT}:9000"
restart: on-failure
command: /start-docs
# Ops - Once off bootstrapping operations for system initialization
minio-init:
container_name: minio-init
image: quay.io/minio/mc
volumes:
- ./docker/production/minio-init.sh:/data/minio-init.sh
entrypoint: [ "/bin/sh", "-c", "/data/minio-init.sh" ]
env_file:
- .env
depends_on:
minio:
condition: service_healthy
volumes:
db-data: null
db-backups: null
minio-data: null