2023-02-02 12:39:58 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-09-09 10:50:59 +00:00
|
|
|
# Use the settings template as default settings if the settings file doesn't already exist
|
2023-02-02 12:40:31 +00:00
|
|
|
SETTINGS_FILE=/volumes/data/settings.ini
|
2023-02-02 12:57:22 +00:00
|
|
|
if [[ ! -f "$SETTINGS_FILE" ]]; then
|
2023-02-02 12:40:31 +00:00
|
|
|
cp deploy/settings_template.ini "$SETTINGS_FILE" \
|
|
|
|
&& echo "Initialized default settings at $SETTINGS_FILE"
|
|
|
|
fi
|
|
|
|
|
2024-09-09 10:50:59 +00:00
|
|
|
# Generate secrets if the secrets file doesn't already exist
|
2023-02-02 13:07:03 +00:00
|
|
|
./manage.py setup generate-secrets
|
|
|
|
|
2023-02-02 12:39:58 +00:00
|
|
|
# Start the server
|
2024-09-09 10:50:59 +00:00
|
|
|
gunicorn --bind 0.0.0.0:80 --workers 4 --log-level error "run:create_app()"
|