tambah trust proxy
This commit is contained in:
29
deploy.sh
Normal file
29
deploy.sh
Normal 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 ==="
|
||||
Reference in New Issue
Block a user