-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
74 lines (66 loc) · 1.72 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
version: "3.9"
services:
db-${MODE}:
image: postgres:13
volumes:
- postgres_data_${MODE}:/var/lib/postgresql/data
env_file:
- db.env
container_name: db-container-${MODE}
redis-${MODE}:
image: "redis:alpine"
web-${MODE}:
image: rnpfind/web
volumes:
- static_volume_${MODE}:/app/staticfiles
environment:
- PORT=8000
- DB_HOST=db-${MODE}
- TRANSPORT_HOST=redis-${MODE}
- DEBUG=0
env_file:
- db.env
expose:
- 8000
depends_on:
- db-${MODE}
- nginx-${MODE}
- redis-${MODE}
container_name: web-container-${MODE}
celery-${MODE}:
image: rnpfind/celery
env_file:
- db.env
environment:
- DB_HOST=db-${MODE}
- TRANSPORT_HOST=redis-${MODE}
- HOST_URL=${HOST_URL}
volumes:
- static_volume_${MODE}:/app/staticfiles
- ./ro-data:/usr/local/lib/python3.8/site-packages/rnpfind/ro-data
depends_on:
- db-${MODE}
- redis-${MODE}
nginx-${MODE}:
image: rnpfind/nginx
volumes:
- static_volume_${MODE}:/app/staticfiles
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
- ./ro-data:/app/ro-data
ports:
- ${HOST_HTTP_PORT}:80
- ${HOST_HTTPS_PORT}:443
environment:
- UPSTREAM_HOST=web-${MODE}
container_name: nginx-container-${MODE}
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot-${MODE}:
image: certbot/certbot
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
postgres_data_${MODE}:
static_volume_${MODE}: