#!/usr/bin/env bash # The one command to run after any change to this repo (compose file, # litellm-config.yaml, .env, or a git pull) to bring the running stack in # sync. Pulls, validates, rebuilds/re-pulls images, and recreates only what # changed — safe to run any time, including with nothing to do. # # ponytail: no rollback/backup logic — this is a single-user homelab box, # not a fleet. If a bad config lands, `git revert` + re-run is the recovery # path, not this script. set -euo pipefail cd "$(dirname "$0")/.." echo "==> git pull" git pull --ff-only echo "==> validating compose config" docker compose config -q echo "==> pulling images" docker compose pull --ignore-buildable echo "==> rebuilding local-build services (e.g. litellm-pgvector)" docker compose build --pull echo "==> recreating changed services" docker compose up -d --remove-orphans echo "==> status" docker compose ps