mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-12 05:28:34 +03:00
MVP celery worker for auto-archiver
This commit is contained in:
47
docker-compose.yml
Normal file
47
docker-compose.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
|
||||
web:
|
||||
build: ./project
|
||||
ports:
|
||||
- 8004:8000
|
||||
command: uvicorn main:app --host 0.0.0.0 --reload
|
||||
volumes:
|
||||
- ./project:/usr/src/app
|
||||
environment:
|
||||
- CELERY_BROKER_URL=redis://redis:6379/0
|
||||
- CELERY_RESULT_BACKEND=redis://redis:6379/0
|
||||
depends_on:
|
||||
- redis
|
||||
|
||||
worker:
|
||||
build: ./project
|
||||
command: celery worker --app=worker.celery --loglevel=info --logfile=logs/celery.log
|
||||
volumes:
|
||||
- ./project:/usr/src/app
|
||||
environment:
|
||||
- CELERY_BROKER_URL=redis://redis:6379/0
|
||||
- CELERY_RESULT_BACKEND=redis://redis:6379/0
|
||||
depends_on:
|
||||
- web
|
||||
- redis
|
||||
|
||||
redis:
|
||||
image: redis:6-alpine
|
||||
# DEV ONLY
|
||||
ports:
|
||||
- 6379:6379
|
||||
|
||||
dashboard:
|
||||
build: ./project
|
||||
command: flower --app=worker.celery --port=5555 --broker=redis://redis:6379/0
|
||||
ports:
|
||||
- 5556:5555
|
||||
environment:
|
||||
- CELERY_BROKER_URL=redis://redis:6379/0
|
||||
- CELERY_RESULT_BACKEND=redis://redis:6379/0
|
||||
depends_on:
|
||||
- web
|
||||
- redis
|
||||
# - worker
|
||||
Reference in New Issue
Block a user