refactor(update-backend): reorder permission settings and update migration message
Some checks failed
Deploy to production / deploy (push) Failing after 3m20s
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:
@@ -48,17 +48,12 @@ if [ -f "$BACKEND_DIR/.env" ]; then
|
|||||||
else
|
else
|
||||||
echo "⚠ WARNUNG: Keine .env-Datei in $BACKEND_DIR gefunden!"
|
echo "⚠ WARNUNG: Keine .env-Datei in $BACKEND_DIR gefunden!"
|
||||||
fi
|
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..."
|
echo "Updating systemd service..."
|
||||||
sudo -n cp "$TARGET_DIR/yourpart.service" /etc/systemd/system/
|
sudo -n cp "$TARGET_DIR/yourpart.service" /etc/systemd/system/
|
||||||
sudo -n systemctl daemon-reload
|
sudo -n systemctl daemon-reload
|
||||||
|
|
||||||
echo "Running database synchronization..."
|
echo "Running database migrations..."
|
||||||
cd "$BACKEND_DIR"
|
cd "$BACKEND_DIR"
|
||||||
export STAGE="$STAGE"
|
export STAGE="$STAGE"
|
||||||
|
|
||||||
@@ -75,4 +70,10 @@ else
|
|||||||
echo "Legacy sync-db übersprungen (Standard)."
|
echo "Legacy sync-db übersprungen (Standard)."
|
||||||
fi
|
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!"
|
echo "Backend update completed!"
|
||||||
|
|||||||
Reference in New Issue
Block a user