refactor(update-backend): reorder permission settings and update migration message
Some checks failed
Deploy to production / deploy (push) Failing after 3m20s

- Moved permission setting commands to the end of the script for better clarity and execution flow.
- Changed the log message from "Running database synchronization..." to "Running database migrations..." to accurately reflect the operation being performed.
- Ensured that permission settings for backend and data directories are consistently applied after the migration process.
[force-deploy]
This commit is contained in:
Torsten Schulz (local)
2026-04-17 13:45:53 +02:00
parent 9a92940dab
commit 1b9d9664b2

View File

@@ -48,17 +48,12 @@ if [ -f "$BACKEND_DIR/.env" ]; then
else
echo "⚠ WARNUNG: Keine .env-Datei in $BACKEND_DIR gefunden!"
fi
echo "Setting permissions..."
sudo -n chown -R yourpart:yourpart "$BACKEND_DIR"
sudo -n chmod -R 755 "$BACKEND_DIR"
sudo -n chown -R yourpart:yourpart "$DATA_DIR"
sudo -n chmod -R 755 "$DATA_DIR"
echo "Updating systemd service..."
sudo -n cp "$TARGET_DIR/yourpart.service" /etc/systemd/system/
sudo -n systemctl daemon-reload
echo "Running database synchronization..."
echo "Running database migrations..."
cd "$BACKEND_DIR"
export STAGE="$STAGE"
@@ -75,4 +70,10 @@ else
echo "Legacy sync-db übersprungen (Standard)."
fi
echo "Setting permissions..."
sudo -n chown -R yourpart:yourpart "$BACKEND_DIR"
sudo -n chmod -R 755 "$BACKEND_DIR"
sudo -n chown -R yourpart:yourpart "$DATA_DIR"
sudo -n chmod -R 755 "$DATA_DIR"
echo "Backend update completed!"