Head of Product & Engineering 877895f43e fix: correct domain from ghl.cast.ph to hl.cast.ph throughout
Update all active config and documentation files to use the correct
production domain hl.cast.ph (not ghl.cast.ph).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-05 14:09:43 +02:00

38 lines
1018 B
Bash

#!/usr/bin/env bash
# deploy.sh — Manual redeploy on an existing Docker server.
# Normally Woodpecker CI handles deploys automatically on push to main or tag.
# Use this script only for manual/emergency redeploys.
# Usage: bash deploy/deploy.sh [--from-registry]
# --from-registry Pull the pre-built image from registry instead of building locally
set -euo pipefail
APP_DIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "$APP_DIR"
FROM_REGISTRY=false
[[ "${1:-}" == "--from-registry" ]] && FROM_REGISTRY=true
echo "==> Pulling latest code"
git pull --ff-only
if $FROM_REGISTRY; then
echo "==> Pulling pre-built image from registry"
docker compose pull bridge
else
echo "==> Building image locally"
docker compose build --no-cache bridge
fi
echo "==> Restarting services"
docker compose up -d --remove-orphans
echo "==> Waiting for health check"
sleep 5
docker compose ps bridge
docker compose logs --tail=20 bridge
echo ""
echo "=== Deploy complete ==="
echo "Health endpoint: https://hl.cast.ph/health"