docker compose run --rm backend alembic upgrade head was starting gunicorn instead of running alembic because entrypoint always ran gunicorn. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
501 B
Bash
Executable file
20 lines
501 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
export PYTHONPATH=/app:$PYTHONPATH
|
|
|
|
# If called with arguments (e.g. alembic upgrade head), execute them directly
|
|
if [ $# -gt 0 ]; then
|
|
exec "$@"
|
|
fi
|
|
|
|
echo "Starting Gunicorn with Uvicorn workers..."
|
|
exec gunicorn app.main:app \
|
|
--worker-class uvicorn.workers.UvicornWorker \
|
|
--workers "${WORKERS_COUNT:-4}" \
|
|
--bind 0.0.0.0:8000 \
|
|
--timeout 120 \
|
|
--graceful-timeout 30 \
|
|
--access-logfile - \
|
|
--error-logfile - \
|
|
--log-level "${LOG_LEVEL:-info}"
|