feat(worker): Add db_worker service with automatic restart and logging

feat(task_overview): Display generated series in task overview
docs(README): Update documentation for background task workers and troubleshooting
This commit is contained in:
Ross
2026-05-17 21:13:40 +01:00
parent ab9847e22e
commit c2d8376e22
8 changed files with 186 additions and 3 deletions
+24
View File
@@ -35,6 +35,30 @@ services:
- "8000"
command: ["/usr/src/app/entrypoint.sh"]
worker:
build:
context: ..
dockerfile: rad/Dockerfile.prod
restart: always
env_file:
- ../.env.${COMPOSE_ENV:-prod}
environment:
- DJANGO_SETTINGS_MODULE=rad.settings
depends_on:
redis:
condition: service_healthy
web:
condition: service_started
volumes:
- ../deploy/settings_local.py:/usr/src/app/rad/settings_local.py:ro
- ../logs:/var/log/rad:rw
entrypoint:
[
"sh",
"-c",
"python manage.py migrate --noinput && exec python manage.py db_worker",
]
nginx:
image: nginx:stable-alpine
restart: always