From f3add65850162684ae322a37abd29ef96f467b3f Mon Sep 17 00:00:00 2001 From: Outis Date: Mon, 1 Jun 2026 09:25:22 -0400 Subject: [PATCH] Add update script for Docker image management This script updates Docker images, restarts containers, and cleans up old image layers. --- update.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 update.sh 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"