-
Notifications
You must be signed in to change notification settings - Fork 0
/
local.yml
92 lines (84 loc) · 1.88 KB
/
local.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
version: '3.3'
volumes:
questionbot_postgres_data: { }
questionbot_postgres_data_backups: { }
questionbot_redis_data:
services:
django: &django
build:
context: .
dockerfile: ./compose/local/django/Dockerfile
image: questionbot_local_django
container_name: questionbot_local_django
hostname: django
depends_on:
- postgres
volumes:
- .:/app:z
env_file:
- ./.env
ports:
- '8000:8000'
environment:
- DJANGO_SETTINGS_MODULE=api.core.local
command: /start
networks:
- tg_bot
bot:
image: "${BOT_IMAGE_NAME:-tg_bot-image}"
container_name: "${BOT_CONTAINER_NAME:-tg_bot-container}"
stop_signal: SIGINT
build:
context: .
working_dir: "/usr/src/app/${BOT_NAME:-tg_bot}"
volumes:
- .:/usr/src/app/${BOT_NAME:-tg_bot}
depends_on:
- django
command: python3 -m bot
restart: always
env_file:
- ".env"
networks:
- tg_bot
postgres:
build:
context: .
dockerfile: ./compose/production/postgres/Dockerfile
image: questionbot_postgres_image
container_name: questionbot_local_postgres
volumes:
- questionbot_postgres_data:/var/lib/postgresql/data
- questionbot_postgres_data_backups:/backups
env_file:
- .env
networks:
- tg_bot
redis:
image: redis
ports:
- "6380:6380"
volumes:
- questionbot_redis_data:/data
command: redis-server --port 6380 --appendonly yes
networks:
- tg_bot
celeryworkerbeat:
<<: *django
container_name: questionbot_celeryworkerbeat
depends_on:
- redis
- postgres
ports: [ ]
command: /start-celeryworker
celerybeat:
<<: *django
container_name: questionbot_celerybeat
depends_on:
- redis
- postgres
ports: [ ]
command: /start-celerybeat
networks:
tg_bot:
driver: bridge