This script updates Docker images, restarts containers, and cleans up old image layers.
31 lines
735 B
Bash
31 lines
735 B
Bash
#!/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"
|