This commit is contained in:
1 parent
641a60fb74
commit
d488162bec
1 file changed
+8
-4
@@ -29,7 +29,7 @@ jobs:
|
||||
sudo chown -R www-data:www-data /var/www/atom-media
|
||||
sudo chmod -R 775 /var/www/atom-media
|
||||
|
||||
# [CRUCIAL STEP]: Red de huidige live uploads (nieuws, logo's) EERST voordat Git of de build iets wist
|
||||
# Red de huidige live uploads (nieuws, logo's) EERST voordat Git of de build iets wist
|
||||
cd /var/www/atom-nexst/
|
||||
if [ -d .next/standalone/public ]; then
|
||||
echo "Backing up current live images and uploads..."
|
||||
@@ -85,16 +85,20 @@ jobs:
|
||||
rsync -av /var/www/atom-media/ .next/standalone/public/
|
||||
fi
|
||||
|
||||
# 7. Permissions & Restart
|
||||
# 7. Permissions (GEBRACHT VÓÓR HET HERSTARTEN)
|
||||
# We forceren de rechten NU op alle gekopieerde bestanden, inclusief de teruggezette rsync-bestanden
|
||||
sudo chown -R www-data:www-data /var/www/atom-nexst/
|
||||
sudo chmod -R g+rw /var/www/atom-nexst/
|
||||
|
||||
# 8. Restart & Check
|
||||
echo "Restarting systemd service gracefully..."
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart atom-nexst.service
|
||||
|
||||
sleep 2
|
||||
# Geef Node.js 3 seconden de tijd om op te starten en de databaseverbinding te openen
|
||||
sleep 3
|
||||
if ! systemctl is-active --quiet atom-nexst.service; then
|
||||
echo "ERROR: atom-nexst.service failed to start!" >&2
|
||||
echo "ERROR: atom-nexst.service failed to start! Check logs using: journalctl -u atom-nexst.service" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user