-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
62 lines (53 loc) · 1.12 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
version: "3.7"
x-app: &app
build: ./backend
image: reactor_app
env_file:
- .envs/.production/app.env
- .envs/.production/postgres.env
volumes:
- ./backups:/var/backups
depends_on:
- db
- redis
services:
db:
image: postgres:11.1
hostname: db
volumes:
- dbdata:/var/lib/postgresql/data
env_file: .envs/.production/postgres.env
redis:
image: redis:5
hostname: redis
volumes:
- redisdata:/data
nginx:
build: ./nginx
hostname: nginx
ports:
- 80:80
- 443:443
- 5432:5432
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- /etc/letsencrypt:/etc/letsencrypt:ro
- /var/www/certbot:/usr/share/nginx/html
depends_on:
- app
- db
app:
<<: *app
command: ["./scripts/run.sh", "prod"]
bot:
<<: *app
command: ["./manage.py", "runbot"]
environment:
- DJANGO_SETTINGS_MODULE=reactor.settings.bot
scheduler:
<<: *app
command: ["./manage.py", "scheduler", "--backup", "--clean-up"]
volumes:
dbdata:
redisdata: