Add release workflow, install.sh and update.sh for customer deployment
Deploy to Production (witstore.wende.it) / deploy (push) Successful in 7s
Deploy to Production (witstore.wende.it) / deploy (push) Successful in 7s
- release.yml: triggered by git tag v*, builds assets, creates ZIP, attaches to Gitea release - install.sh: interactive first-time setup (DB config, key:generate, migrate, seed, cache) - update.sh: update existing installation (clear caches, migrate, rebuild) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
# WITshop Update
|
||||
# Ausführen mit: bash update.sh
|
||||
|
||||
set -e
|
||||
GREEN='\033[0;32m'; YELLOW='\033[1;33m'; NC='\033[0m'
|
||||
|
||||
echo ""
|
||||
echo "=================================="
|
||||
echo " WITshop Update"
|
||||
echo "=================================="
|
||||
echo ""
|
||||
|
||||
PHP=$(which php 2>/dev/null || echo "/opt/plesk/php/8.4/bin/php")
|
||||
COMPOSER=$(which composer 2>/dev/null || echo "/usr/local/psa/var/modules/composer/composer.phar")
|
||||
|
||||
if [ ! -f ".env" ]; then
|
||||
echo "FEHLER: Keine .env gefunden. Bitte zuerst install.sh ausführen."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "--- Cache leeren ---"
|
||||
$PHP -d open_basedir="" artisan config:clear
|
||||
$PHP -d open_basedir="" artisan route:clear
|
||||
$PHP -d open_basedir="" artisan view:clear
|
||||
$PHP -d open_basedir="" artisan cache:clear
|
||||
echo -e "${GREEN}✓ Cache geleert${NC}"
|
||||
|
||||
echo ""
|
||||
echo "--- Abhängigkeiten aktualisieren ---"
|
||||
$PHP -d open_basedir="" $COMPOSER install --no-dev --optimize-autoloader --no-interaction
|
||||
echo -e "${GREEN}✓ Composer${NC}"
|
||||
|
||||
echo ""
|
||||
echo "--- Migrationen ausführen ---"
|
||||
$PHP -d open_basedir="" artisan migrate --force
|
||||
$PHP -d open_basedir="" artisan db:seed --class=EmailTemplateSeeder --force
|
||||
echo -e "${GREEN}✓ Datenbank aktualisiert${NC}"
|
||||
|
||||
echo ""
|
||||
echo "--- Cache aufbauen ---"
|
||||
$PHP -d open_basedir="" artisan config:cache
|
||||
$PHP -d open_basedir="" artisan route:cache
|
||||
$PHP -d open_basedir="" artisan view:cache
|
||||
echo -e "${GREEN}✓ Cache erstellt${NC}"
|
||||
|
||||
echo ""
|
||||
echo "=================================="
|
||||
echo -e "${GREEN} Update abgeschlossen!${NC}"
|
||||
echo "=================================="
|
||||
echo ""
|
||||
Reference in New Issue
Block a user