-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (47 loc) · 1.17 KB
/
docker-compose.yml
File metadata and controls
53 lines (47 loc) · 1.17 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
version: '3.8'
services:
db:
image: postgres:15
restart: always
environment:
DB_HOST: db
DB_USER: syncrauser
DB_PASSWORD: syncrapassword
DB_NAME: syncraflow_db
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:alpine
restart: always
api:
build: .
command: uvicorn app.main:app --host 0.0.0.0 --port 8080 --reload
volumes:
- .:/app
ports:
- "8080:8080"
environment:
- DATABASE_URL=postgresql://syncrauser:syncrapassword@db:5432/syncraflow_db
- REDIS_URL=redis://redis:6380/0
depends_on:
- db
- redis
worker:
build: .
command: celery -A app.worker.celery worker --loglevel=info
volumes:
- .:/app
environment:
- DATABASE_URL=postgresql://syncrauser:syncrapassword@db:5432/syncraflow_db
- REDIS_URL=redis://redis:6380/0
- CELERY_BROKER_URL=redis://redis:6380/0
- CELERY_RESULT_BACKEND=redis://redis:6380/0
- CELERY_WORKER_CONCURRENCY=4
- CELERY_TASK_TIME_LIMIT=300
- CELERY_TASK_SOFT_TIME_LIMIT=240
- ALLOWED_HOSTS=*
depends_on:
- redis
- db
volumes:
postgres_data: