entrypoint.sh 513 B

1234567891011121314151617
  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. #poetry run gunicorn -c gunicorn_config.py main:app
  13. gunicorn -w 4 -t ${APP_SERVER_WORKERS:-1} -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:8086 --threads 20 main:app
  14. fi