mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-11-15 05:12:38 +01:00
Fresh installs no longer wait up to 12 hours for the first periodic check.
25 lines
644 B
Bash
25 lines
644 B
Bash
#!/bin/bash
|
|
|
|
set -o errexit
|
|
set -o pipefail
|
|
set -o nounset
|
|
|
|
# Set INTERNAL_PORT with default value of 8000
|
|
INTERNAL_PORT=${INTERNAL_PORT:-8000}
|
|
|
|
# Remove flag file if it exists from previous run
|
|
rm -f /tmp/migrations_complete
|
|
|
|
python manage.py migrate
|
|
|
|
# Create flag file to signal migrations are complete
|
|
touch /tmp/migrations_complete
|
|
|
|
python manage.py setup_users
|
|
python manage.py setup_oauth
|
|
|
|
# Check for updates on startup instead of waiting for the next periodic run; never block boot on it
|
|
python manage.py procrastinate defer check_for_updates || true
|
|
|
|
exec gunicorn WYGIWYH.wsgi:application --bind 0.0.0.0:$INTERNAL_PORT --timeout 600
|