-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (44 loc) · 1.02 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
version: '3.8'
services:
web:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
volumes:
- ./:/code
environment:
- REDIS_HOST=redis
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
env_file:
- ./app/.env
depends_on:
- redis
command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload
celery_worker:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./:/code
environment:
- REDIS_HOST=redis
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
env_file:
- ./app/.env
depends_on:
- redis
# command: celery -A app.celery_worker.celery worker --loglevel=info
command: celery -A app.config.celery_app worker --loglevel=info
redis:
image: redis:7.2-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
volumes:
redis_data: