chore(scripts): add update.sh, hook it into agent/deploy workflow
One script to bring the running stack in sync after any change: git pull, validate compose config, rebuild the litellm-pgvector local build, re-pull images, recreate what changed. Documented in README's quickstart, and CLAUDE.md now tells agents to run it after touching compose/config/scripts rather than just describing a change as done. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user