Head of Product & Engineering 221cd94999
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix: add git pull to deploy.sh so docker-compose.yaml stays in sync
Without this, the server would run a stale docker-compose.yaml after
any infra changes (e.g. adding MongoDB auth) even though the image
was updated. deploy.sh now pulls repo changes before pulling the image.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 16:15:27 +02:00

30 lines
666 B
Bash

#!/usr/bin/env bash
# deploy.sh — Called by Woodpecker CI on every push to main.
# Can also be run manually for emergency redeployments.
# Pulls the latest image from the registry and restarts the stack.
set -euo pipefail
APP_DIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "$APP_DIR"
echo "==> Updating repo"
git pull origin main
echo "==> Pulling latest image from registry"
docker compose pull bridge
echo "==> Restarting services"
docker compose up -d --remove-orphans
echo "==> Status"
sleep 5
docker compose ps bridge
echo ""
echo "==> Recent logs"
docker compose logs --tail=30 bridge
echo ""
echo "=== Deploy complete — https://hl.cast.ph/health ==="