-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
33 lines (33 loc) · 985 Bytes
/
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
version: '3.8'
services:
web:
build:
context: ./
dockerfile: Dockerfile
ports:
- "8004:8000"
environment:
REMAP_SIGTERM: SIGQUIT
REDIS_URL: redis://redis:6379
CELERY_BROKER_URL: redis://redis:6379/0
CELERY_RESULT_BACKEND: redis://redis:6379/0
command: uvicorn main:app --host 0.0.0.0 --reload
depends_on:
- redis
worker:
deploy:
replicas: ${WORKER_REPLICAS:-1}
build:
context: ./
dockerfile: Dockerfile
environment:
REMAP_SIGTERM: SIGQUIT
REDIS_URL: redis://redis:6379
CELERY_BROKER_URL: redis://redis:6379/0
CELERY_RESULT_BACKEND: redis://redis:6379/0
command: celery --app=celery_app worker --loglevel=INFO --concurrency=1
depends_on:
- web
- redis
redis:
image: "redis:7-alpine"