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