-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-base.yml
56 lines (56 loc) · 1.78 KB
/
docker-compose-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
version: '2'
services:
nginx:
restart: unless-stopped
build:
context: ./infra/nginx/
volumes:
# Nginx reads fake certificates at /code/infra/ssl during bootstrapping
- .:/code
# Nginx reads static files at /data/static
- static:/data/static
# Nginx reads /etc/letsencrypt to find certificates
- letsencrypt:/etc/letsencrypt
# Nginx serves /data/letsencrypt_webroot as part of the Let's Encrypt challenge
- letsencrypt_webroot:/data/letsencrypt_webroot
app:
restart: unless-stopped
build:
context: .
dockerfile: ./infra/app/Dockerfile
env_file: ./config/app_env.txt
environment:
- GEOSERVER_REST_ENDPOINT=http://geoserver:8080/geoserver/rest/
volumes:
- .:/code
# Django collectstatic command writes to /data/static
- static:/data/static
# Certbot writes certificates to /etc/letsencrypt
- letsencrypt:/etc/letsencrypt
# Certbot writes challenge files to /data/letsencrypt_webroot
- letsencrypt_webroot:/data/letsencrypt_webroot
command: /usr/local/bin/gunicorn --chdir /code/stazegis stazegis.wsgi:application -w 2 -b :8000
db:
restart: unless-stopped
build:
context: ./infra/db
env_file: ./config/db_env.txt
volumes:
# Backup/restore scripts are located in /code/infra/db
- .:/code
# Postgres reads/writes to /var/lib/postgresql
- postgres_data:/var/lib/postgresql
# Postgres reads/writes backups to /data/postgres_backup
- postgres_backup:/data/postgres_backup
geoserver:
restart: unless-stopped
image: kartoza/geoserver:2.11.2
volumes:
- geoserver_data:/opt/geoserver/data_dir
volumes:
static:
letsencrypt:
letsencrypt_webroot:
postgres_data:
postgres_backup:
geoserver_data: