-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
74 lines (68 loc) · 1.28 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'
services:
bot:
networks:
- bot
depends_on:
- bot_postgres
- bot_redis
command: python app.py
container_name: schedule_bot
environment:
- POSTGRES_PASSWORD
- POSTGRES_USER
- POSTGRES_DB
- REDIS_PASSWORD
- SCHEDULE_URL
- BOT_TOKEN
- SENTRY_SDK
- AMPLITUDE_KEY
build:
context: .
dockerfile: Dockerfile
restart: always
volumes:
- ./:/app/
tty: true
bot_celery:
command: celery -B -A notifications worker --concurrency=2 -l debug
build:
context: .
dockerfile: Dockerfile
networks:
- bot
environment:
- POSTGRES_PASSWORD
- BOT_TOKEN
- SCHEDULE_URL
depends_on:
- bot_postgres
- bot_redis
bot_postgres:
command: postgres
image: postgres:12
networks:
- bot
environment:
- POSTGRES_PASSWORD
- POSTGRES_USER
- POSTGRES_DB
ports:
- "5432:5432"
volumes:
- pg-data:/var/lib/postgresql/data
- pg-data:/backups
bot_redis:
image: library/redis:6.0.6
command: redis-server
networks:
- bot
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- redis-data:/data/
networks:
bot:
volumes:
pg-data:
redis-data: