Files
auto-archiver-api/docker-compose.yml
Lilia Kai 91762f58b7 Add option to serve local archive files
Set an environment variable in the docker compose file, then reference
that variable in main.py to mount the local archive so that the links
generated by auto-archiver will work correctly. Fixes #8
2023-09-05 16:10:37 +02:00

61 lines
1.6 KiB
YAML

version: '3.8'
services:
web:
build: ./src
restart: always
ports:
- 8004:8000
command: uvicorn main:app --host 0.0.0.0 --reload
volumes:
- ./src:/app
env_file: src/.env
environment:
- CELERY_BROKER_URL=redis://:${REDIS_PASSWORD}@redis:6379/0
- CELERY_RESULT_BACKEND=redis://:${REDIS_PASSWORD}@redis:6379/0
- SERVE_LOCAL_ARCHIVE=/app/local_archive # See orchestration.yaml local_storage.save_to
depends_on:
- redis
worker:
build: ./src
restart: always
command: celery worker --app=worker.celery --loglevel=info --logfile=logs/celery.log
volumes:
- ./src:/app
env_file: src/.env
environment:
- CELERY_BROKER_URL=redis://:${REDIS_PASSWORD}@redis:6379/0
- CELERY_RESULT_BACKEND=redis://:${REDIS_PASSWORD}@redis:6379/0
depends_on:
- web
- redis
redis:
image: redis:6-alpine
# command: redis-server /conf/redis.conf # DEV ONLY
command: redis-server /conf/redis.conf --requirepass ${REDIS_PASSWORD}
volumes:
- "./redis/data:/data"
- "./redis/config:/conf"
restart: always
# DEV ONLY
# ports:
# - 6379:6379
dashboard:
build: ./src
restart: always
command: flower --app=worker.celery --port=5555 --broker=redis://:${REDIS_PASSWORD}@redis:6379/0 --basic_auth=${FLOWER_USERNAME}:${FLOWER_PASSWORD}
env_file: src/.env
ports:
- 5556:5555
environment:
- CELERY_BROKER_URL=redis://:${REDIS_PASSWORD}@redis:6379/0
- CELERY_RESULT_BACKEND=redis://:${REDIS_PASSWORD}@redis:6379/0
depends_on:
- web
- redis
- worker