2026-09-30 14:54:38 +03:00
|
|
|
#!/bin/sh
|
2026-11-02 14:00:01 +03:00
|
|
|
# Container start-up for the web service: optionally seed dummy data, then serve with gunicorn.
|
|
|
|
|
# The migrations run beforehand (ROLE=migrate); static files are collected at build time.
|
2026-09-30 14:54:38 +03:00
|
|
|
set -ue
|
|
|
|
|
cd /usr/src/app
|
|
|
|
|
export DJANGO_SETTINGS_MODULE=dynamicweb.settings
|
|
|
|
|
|
2026-09-30 15:33:02 +03:00
|
|
|
if [ "${SEED_DUMMY_DATA:-False}" = "True" ]; then
|
|
|
|
|
python manage.py seed_dummy_data || echo 'seed_dummy_data failed, continuing'
|
|
|
|
|
fi
|
|
|
|
|
|
2026-11-02 14:00:01 +03:00
|
|
|
exec gunicorn dynamicweb.wsgi:application --bind '[::]:8000' \
|
2026-10-09 19:36:29 +03:00
|
|
|
--workers "${GUNICORN_WORKERS:-3}" --timeout "${GUNICORN_TIMEOUT:-120}" \
|
|
|
|
|
--access-logfile - --error-logfile -
|