Fix: complete deploy script, ASSET_URL empty for staging/prod

- deploy.sh: mkdir + chmod for storage/bootstrap added
- deploy.sh: SCRIPT_DIR fixed for source path
- src/.env.staging + production: ASSET_URL/LIVEWIRE_ASSET_URL cleared (local only)
- setup.sh SCHRITT 9+11: already correct, no changes needed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
boban 2026-04-19 00:44:12 +02:00
parent 2a2c373bd3
commit 7c4884c1a0
1 changed files with 21 additions and 3 deletions

View File

@ -2,6 +2,8 @@
set -e set -e
MODE=${1:-production} MODE=${1:-production}
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR"
if [ "$MODE" = "staging" ]; then if [ "$MODE" = "staging" ]; then
COMPOSE="docker-compose.staging.yml" COMPOSE="docker-compose.staging.yml"
@ -12,8 +14,11 @@ else
fi fi
echo "🚀 Aziros deploying... ($MODE)" echo "🚀 Aziros deploying... ($MODE)"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR" # Variablen für Docker Compose exportieren
set -a
source "$SCRIPT_DIR/src/.env"
set +a
# Git Pull # Git Pull
echo "→ Code aktualisieren..." echo "→ Code aktualisieren..."
@ -29,7 +34,20 @@ docker compose -f $COMPOSE exec -T app \
# Composer # Composer
echo "→ Composer install..." echo "→ Composer install..."
docker compose -f $COMPOSE exec -T app \ docker compose -f $COMPOSE exec -T app \
composer install --no-dev --optimize-autoloader composer install --no-dev \
--optimize-autoloader
# Verzeichnisse sicherstellen
docker compose -f $COMPOSE exec -T app \
mkdir -p \
bootstrap/cache \
storage/framework/cache \
storage/framework/sessions \
storage/framework/views \
storage/logs
docker compose -f $COMPOSE exec -T app \
chmod -R 775 bootstrap/cache storage
# Migrations # Migrations
echo "→ Migrationen..." echo "→ Migrationen..."