forked from LiveCarta/CommentAutomation
Added entrypoint, changed Dockerfile to multi-target variant
This commit is contained in:
24
entrypoint.sh
Normal file
24
entrypoint.sh
Normal 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
|
||||
Reference in New Issue
Block a user