entrypoint.sh 339 B

123456789101112131415
  1. #!/bin/bash
  2. set -e
  3. if [[ "${MIGRATION_ENABLED}" == "true" ]]; then
  4. echo "Running migrations"
  5. alembic upgrade head
  6. fi
  7. if [[ "${MODE}" == "worker" ]]; then
  8. echo "celery run"
  9. celery -A worker.celery_app worker -c ${CELERY_WORKERS:-1} -l INFO
  10. else
  11. uvicorn main:app --host 0.0.0.0 --port 8086 --workers ${APP_SERVER_WORKERS:-1}
  12. fi