simulations_apps / entrypoint.sh
tiffank1802
Move migrations to runtime via entrypoint script
09c4d3b
raw
history blame contribute delete
377 Bytes
#!/bin/bash
set -e
# Activate conda environment
source /opt/conda/etc/profile.d/conda.sh
conda activate base
# Run migrations
cd /app/backend
python manage.py migrate --noinput
# Collect static files (if not already done)
python manage.py collectstatic --noinput --clear
# Start gunicorn
exec gunicorn --bind 0.0.0.0:7860 --workers 2 --timeout 120 backend.wsgi:application