2022-12-01 19:18:10 +05:30
|
|
|
#!/bin/bash
|
|
|
|
|
set -e
|
2022-12-13 20:47:49 +05:30
|
|
|
python manage.py wait_for_db
|
2022-12-01 19:18:10 +05:30
|
|
|
python manage.py migrate
|
2023-02-21 11:31:43 +05:30
|
|
|
|
2023-11-19 01:48:05 +05:30
|
|
|
# Set default value for ENABLE_REGISTRATION
|
|
|
|
|
ENABLE_REGISTRATION=${ENABLE_REGISTRATION:-1}
|
|
|
|
|
|
|
|
|
|
# Check if ENABLE_REGISTRATION is not set to '0'
|
|
|
|
|
if [ "$ENABLE_REGISTRATION" != "0" ]; then
|
|
|
|
|
# Register instance
|
|
|
|
|
python manage.py register_instance
|
|
|
|
|
# Load the configuration variable
|
|
|
|
|
python manage.py configure_instance
|
|
|
|
|
fi
|
|
|
|
|
|
2023-11-13 15:57:19 +05:30
|
|
|
# Create the default bucket
|
2023-11-20 12:36:48 +05:30
|
|
|
python manage.py create_bucket
|
2023-02-21 11:31:43 +05:30
|
|
|
|
2023-11-07 18:05:38 +05:30
|
|
|
exec gunicorn -w $GUNICORN_WORKERS -k uvicorn.workers.UvicornWorker plane.asgi:application --bind 0.0.0.0:8000 --max-requests 1200 --max-requests-jitter 1000 --access-logfile -
|