chore: update deploy script for VPS paths and PHP 8.4
Point APP_DIR at /home/hausdesign/preregister and run artisan/composer via explicit PHP and Composer binaries. Made-with: Cursor
This commit is contained in:
25
deploy.sh
25
deploy.sh
@@ -9,8 +9,9 @@ set -e
|
||||
# ./deploy.sh v1.2.0 → deploys specific tag
|
||||
# ──────────────────────────────────────────
|
||||
|
||||
# !! UPDATE THIS PATH TO YOUR VPS DIRECTORY !!
|
||||
APP_DIR="/home/hausdesign/domains/preregister.hausdesign.nl/public_html"
|
||||
APP_DIR="/home/hausdesign/preregister"
|
||||
PHP="/usr/local/php84/bin/php"
|
||||
COMPOSER="/usr/local/bin/composer"
|
||||
TAG="${1:-}"
|
||||
|
||||
echo "══════════════════════════════════════"
|
||||
@@ -21,7 +22,7 @@ cd "$APP_DIR"
|
||||
|
||||
# 1. Maintenance mode
|
||||
echo "→ Enabling maintenance mode..."
|
||||
php artisan down --retry=30 || true
|
||||
$PHP artisan down --retry=30 || true
|
||||
|
||||
# 2. Pull latest code
|
||||
echo "→ Pulling from Gitea..."
|
||||
@@ -38,7 +39,7 @@ fi
|
||||
|
||||
# 3. Install PHP dependencies
|
||||
echo "→ Installing Composer dependencies..."
|
||||
composer install --no-dev --optimize-autoloader --no-interaction
|
||||
$PHP $COMPOSER install --no-dev --optimize-autoloader --no-interaction
|
||||
|
||||
# 4. Install Node dependencies and build
|
||||
echo "→ Installing npm packages..."
|
||||
@@ -49,25 +50,25 @@ npm run build
|
||||
|
||||
# 5. Run migrations
|
||||
echo "→ Running migrations..."
|
||||
php artisan migrate --force
|
||||
$PHP artisan migrate --force
|
||||
|
||||
# 6. Clear and rebuild caches
|
||||
echo "→ Clearing caches..."
|
||||
php artisan config:cache
|
||||
php artisan route:cache
|
||||
php artisan view:cache
|
||||
php artisan event:cache
|
||||
$PHP artisan config:cache
|
||||
$PHP artisan route:cache
|
||||
$PHP artisan view:cache
|
||||
$PHP artisan event:cache
|
||||
|
||||
# 7. Restart queue (process any pending jobs with new code)
|
||||
echo "→ Restarting queue workers..."
|
||||
php artisan queue:restart
|
||||
$PHP artisan queue:restart
|
||||
|
||||
# 8. Storage link (idempotent)
|
||||
php artisan storage:link 2>/dev/null || true
|
||||
$PHP artisan storage:link 2>/dev/null || true
|
||||
|
||||
# 9. Disable maintenance mode
|
||||
echo "→ Going live!"
|
||||
php artisan up
|
||||
$PHP artisan up
|
||||
|
||||
echo ""
|
||||
echo "══════════════════════════════════════"
|
||||
|
||||
Reference in New Issue
Block a user