tambah trust proxy

This commit is contained in:
Saufi
2026-06-16 20:06:05 +08:00
parent 9d4717eb45
commit 61f6e3a587
13 changed files with 108 additions and 153 deletions

29
deploy.sh Normal file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
# myAnsuran KIK-JPPH — Production Deploy Script
# Dipanggil oleh webhook selepas git push ke Gitea (branch master)
set -e
PROJECT_DIR="/srv/myansuran"
LOG="$PROJECT_DIR/deploy.log"
log() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" | tee -a "$LOG"; }
log "=== Deploy dimulakan ==="
cd "$PROJECT_DIR"
log "git pull..."
git pull origin master
# Kod di-bind-mount (./src:/var/www/html) jadi perubahan terus aktif —
# tak perlu rebuild image untuk perubahan kod biasa.
log "composer install..."
docker exec myansuran-app composer install --no-dev --optimize-autoloader --no-interaction
log "migrate database..."
docker exec myansuran-app php artisan migrate --force
log "optimize cache..."
docker exec myansuran-app php artisan optimize
log "=== Deploy selesai ==="