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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user