2023-02-02 12:39:58 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Generate secrets if the secrets file does not already exist
|
|
|
|
./manage.py setup generate-secrets
|
|
|
|
|
2023-02-02 12:40:31 +00:00
|
|
|
# Use settings template as default settings if the settings does not file already exist
|
|
|
|
SETTINGS_FILE=/volumes/data/settings.ini
|
|
|
|
if [[ -f "$SETTINGS_FILE" ]]; then
|
|
|
|
cp deploy/settings_template.ini "$SETTINGS_FILE" \
|
|
|
|
&& echo "Initialized default settings at $SETTINGS_FILE"
|
|
|
|
fi
|
|
|
|
|
2023-02-02 12:39:58 +00:00
|
|
|
# Start the server
|
|
|
|
gunicorn --bind "0.0.0.0:80" --workers "5" --log-file "/volumes/logs/gunicorn.log" "run:create_app()"
|