diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..2576a54 --- /dev/null +++ b/update.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# ~/docker/ai-image-gen/update.sh +# +# Run this manually when you have a specific reason to update. +# Models and outputs are in named volumes — they are never touched. +# +# Usage: +# chmod +x update.sh (once) +# ./update.sh (when you want to update) + +set -euo pipefail +cd "$(dirname "$0")" + +echo "==> Pulling latest images..." +docker compose pull + +echo "" +echo "==> Restarting containers with new images..." +docker compose up -d --force-recreate + +echo "" +echo "==> Cleaning up old image layers..." +docker image prune -f + +echo "" +echo "==> Done. Services:" +echo " Forge → http://localhost:7860" +echo " InvokeAI → http://localhost:9090" +echo "" +echo " Watch logs: docker compose logs -f"