-
Notifications
You must be signed in to change notification settings - Fork 73
/
docker-compose.yml
92 lines (90 loc) · 1.92 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
version: "3.8"
services:
base-image:
image: yt-base-image
build:
dockerfile: base.Dockerfile
deploy:
mode: replicated
replicas: 0
api:
container_name: yt_api
build:
context: .
dockerfile: app_api/Dockerfile
env_file:
- envs/.env_common
- envs/.env_api
restart: unless-stopped
ports:
- "1984:8000"
command: bash -c "python start.py && python main.py"
depends_on:
- postgres
- rabbitmq
- worker
- redis
bot:
container_name: yt_bot
build:
context: .
dockerfile: app_bot/Dockerfile
env_file:
- envs/.env_common
- envs/.env_bot
restart: unless-stopped
command: >
bash -c "python start.py && python main.py"
depends_on:
- postgres
- rabbitmq
- worker
- api
volumes:
- "shared-tmpfs:/tmp/download_tmpfs"
worker:
container_name: yt_worker
build:
context: .
dockerfile: app_worker/Dockerfile
env_file:
- envs/.env_common
- envs/.env_worker
restart: unless-stopped
command: >
bash -c "python start.py && alembic upgrade head && python main.py"
depends_on:
- postgres
- rabbitmq
volumes:
- "/data/downloads:/filestorage"
- "shared-tmpfs:/tmp/download_tmpfs"
postgres:
container_name: yt_postgres
image: "postgres:14"
env_file:
- envs/.env_common
ports:
- "5435:5432"
restart: unless-stopped
volumes:
- pgdata:/var/lib/postgresql/data
rabbitmq:
image: "rabbitmq:3.11-management-alpine"
container_name: yt_rabbitmq
ports:
- "25672:5672"
- "15672:15672"
restart: unless-stopped
redis:
image: "redis:alpine"
container_name: yt_redis
restart: unless-stopped
volumes:
pgdata:
shared-tmpfs:
driver: local
driver_opts:
type: "tmpfs"
device: "tmpfs"
o: "size=7168m,uid=1000"