Files
state-corp-backend/docker/scripts/start-web.sh
Aleksandr Meshchriakov b025f12856
All checks were successful
CI/CD Pipeline / Code Quality Checks (push) Successful in 4m32s
CI/CD Pipeline / Run Tests (push) Successful in 6m30s
CI/CD Pipeline / Build and Push Dev Images (push) Successful in 33s
CI/CD Pipeline / Deploy Dev via Compose (push) Successful in 31s
fix: serve collected static files with whitenoise
2026-07-16 15:42:35 +02:00

20 lines
505 B
Bash
Executable File

#!/usr/bin/env sh
set -eu
export DJANGO_SETTINGS_MODULE="${DJANGO_SETTINGS_MODULE:-settings.production}"
export STARTUP_COMPONENT="${STARTUP_COMPONENT:-web}"
case "${DJANGO_SETTINGS_MODULE}" in
settings.dev|settings.production|settings.test)
;;
esac
python src/manage.py collectstatic --noinput
exec gunicorn core.wsgi:application \
--bind "0.0.0.0:${PORT:-8000}" \
--workers "${GUNICORN_WORKERS:-3}" \
--timeout "${GUNICORN_TIMEOUT:-300}" \
--access-logfile "-" \
--error-logfile "-"