1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-12-24 23:51:03 +00:00

Create default settings file if no settings file exists

This commit is contained in:
Mo 2023-02-02 13:40:31 +01:00
parent eb0a9fc5cb
commit 889112d475

View file

@ -3,5 +3,12 @@
# Generate secrets if the secrets file does not already exist # Generate secrets if the secrets file does not already exist
./manage.py setup generate-secrets ./manage.py setup generate-secrets
# 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
# Start the server # Start the server
gunicorn --bind "0.0.0.0:80" --workers "5" --log-file "/volumes/logs/gunicorn.log" "run:create_app()" gunicorn --bind "0.0.0.0:80" --workers "5" --log-file "/volumes/logs/gunicorn.log" "run:create_app()"