forked from eatyourpeas/rcpch_nhs_organisations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (54 loc) · 1.51 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
x-global-environment: &global
env_file:
- envs/.env # env file - NOT committed to Git
services:
# Caddy reverse proxy - web-facing SSL server
caddy:
<<: *global # this will inherit all the envs from x-global-environment
depends_on:
- django
image: caddy
ports:
- "80:80"
- "443:443"
restart: always
volumes:
- caddy-data:/data/
- caddy-data:/config/
- ./Caddyfile:/etc/caddy/Caddyfile
- ./staticdocs:/srv/staticdocs
# Django web application
django: &django
<<: *global # this will inherit all the envs from x-global-environment
ports:
- 8003:8003
build: .
depends_on:
- postgis
volumes:
- .:/app/
command: >
sh -c "python -u manage.py collectstatic --noinput &&
python -u manage.py makemigrations &&
python -u manage.py migrate &&
echo $$DJANGO_STARTUP_COMMAND &&
$$DJANGO_STARTUP_COMMAND"
restart: always
# PostgreSQL with PostGIS extension
postgis:
<<: *global # this will inherit all the envs from x-global-environment
image: postgis/postgis:15-3.3
volumes:
- postgis-data:/var/lib/postgresql/data
restart: always
mkdocs:
<<: *django # this will inherit all the settings from the django service
ports:
- 8004:8004
command: >
sh -c "mkdocs build --config-file documentation/mkdocs.yml &&
mkdocs serve --config-file documentation/mkdocs.yml"
restart: always
volumes:
caddy-data:
postgis-data: