1
0

Added entrypoint, changed Dockerfile to multi-target variant

This commit is contained in:
2026-03-30 16:30:51 +00:00
parent 8837ebe470
commit c1ef3a75b9
3 changed files with 78 additions and 5 deletions

24
entrypoint.sh Normal file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env sh
set -eu
mode="${1:-http}"
case "$mode" in
http)
shift || true
exec uv run uvicorn comment_automation.main:app \
--app-dir src \
--host 0.0.0.0 \
--port 8000 \
"$@"
;;
celery)
shift || true
exec uv run celery -A comment_automation.celery_app:celery_app worker \
--loglevel "${CELERY_LOG_LEVEL:-info}" \
"$@"
;;
*)
exec "$@"
;;
esac