-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (85 loc) · 2.42 KB
/
docker-compose.yml
File metadata and controls
93 lines (85 loc) · 2.42 KB
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
93
name: cuemeet
services:
backend-api:
container_name: backend_rest
restart: always
build:
context: ./api-backend
dockerfile: Dockerfile
image: cuemeet:api-backend
ports:
- "4000:4000"
depends_on:
- pg-db
- redis
worker-api:
container_name: worker_rest
restart: always
build:
context: ./worker-backend
target: worker-backend
dockerfile: Dockerfile
image: cuemeet:worker-backend
command: > # Migration is getting executed here
/bin/bash -c "python manage.py migrate && gunicorn worker_backend.wsgi:application --workers 4 -b 0.0.0.0:8000"
ports:
- "8000:8000"
depends_on:
- pg-db
- redis
- backend-api
redis:
image: redis:alpine
container_name: redis
restart: always
# ports: ## Uncomment this if you want to expose redis port
# - "6379:6379"
pg-db:
image: postgres:16
container_name: postgres_db
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data
- ./pg-db/init-multiple-databases.sql:/docker-entrypoint-initdb.d/init-multiple-databases.sql
# ports: ## Uncomment this if you want to expose postgres port
# - "5432:5432"
env_file:
- ./pg-db/.db.env
worker-grpc:
container_name: grpc-server
restart: always
image: cuemeet:worker-backend
command: bash -c "echo 'Starting gRPC server...' && python manage.py grpcrunaioserver 0.0.0.0:5500 --max-workers 2 --verbosity 3"
# ports: ## Uncomment this if you want to expose grpc port
# - "5500:5500"
depends_on:
- pg-db
- redis
- backend-api
- worker-api
celery-worker:
container_name: celery-worker
restart: always
image: cuemeet:worker-backend
command: python -m celery -A worker_backend worker -l info --pool threads --concurrency=4 -E
depends_on:
- pg-db
- redis
- backend-api
- worker-api
flower:
container_name: flower
restart: always
image: cuemeet:worker-backend
command: bash -c "echo 'Starting celery flower dashboard...' && sleep 14 && python -m celery -A worker_backend flower --port=5555" ## --basic-auth=FLOWER_AUTH_USER:FLOWER_AUTH_PASSWORD ## Uncomment this if you want to add basic auth
ports:
- "5556:5555"
depends_on:
- pg-db
- redis
- backend-api
- worker-api
- celery-worker
volumes:
postgres_data:
driver: local