tambah webhook

This commit is contained in:
Saufi
2026-05-22 16:12:05 +08:00
parent d9ecdfc8f6
commit 2a67d937e8
5 changed files with 74 additions and 0 deletions

27
deploy.sh Normal file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
# eCert MBIP — Production Deploy Script
# Dipanggil oleh webhook selepas git push ke GitHub
set -e
PROJECT_DIR="/srv/ecert"
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 main
log "migrate database..."
docker exec ecert_app php artisan migrate --force
log "optimize cache..."
docker exec ecert_app php artisan optimize
log "restart queue worker..."
docker restart ecert_queue
log "=== Deploy selesai ==="