-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
75 lines (69 loc) · 1.66 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
version: "3.8"
services:
django: &django
build:
context: .
dockerfile: ./docker/production/django/Dockerfile
env_file: .env
command: /app/gunicorn.sh
expose:
- 8000
depends_on:
- postgis
volumes:
- ./docker/production/django/data/:/data/
postgis:
build:
context: .
dockerfile: ./docker/production/postgis/Dockerfile
volumes:
- ./docker/production/postgis/data:/var/lib/postgresql/data
- ./docker/production/postgis/backups:/backups
env_file: .env
swagger:
image: swaggerapi/swagger-ui
restart: unless-stopped
expose:
- 8080
environment:
- SWAGGER_JSON=/schema.yml
- BASE_URL=/docs
volumes:
- ./docker/production/swagger/data/schema.yml:/schema.yml
nginx:
build:
context: docker/production/nginx
dockerfile: Dockerfile
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "--silent", "--fail", "http://localhost"]
interval: 45s
timeout: 5s
retries: 3
ports:
- "8081:80"
- "4443:443"
env_file: .env_http
volumes:
- ./docker/production/nginx/conf-templates:/etc/nginx/templates
- ssl:/etc/letsencrypt
- certbot:/var/www/certbot
- ./log/:/var/log/nginx/
depends_on:
- django
certbot:
build:
context: docker/production/certbot
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
nginx:
condition: service_healthy
env_file: .env_http
volumes:
- ssl:/etc/letsencrypt
- certbot:/var/www/certbot
- .log/certbot/:/var/log/letsencrypt/
volumes:
ssl: {}
certbot: {}