feat: update app container after image pull

This commit is contained in:
lezi-fun committed 2026-08-14 17:06:04 +08:00
1 parent e198a5c6c0
commit dafd1a53a5
2 files changed
+30 -6

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -Eeuo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
cd "$PROJECT_ROOT"
if docker compose version >/dev/null 2>&1; then
compose=(docker compose)
elif command -v docker-compose >/dev/null 2>&1; then
compose=(docker-compose)
else
echo "Docker Compose is required (docker compose or docker-compose)." >&2
exit 1
fi
echo "Pulling the latest Forumlify image..."
"${compose[@]}" pull app
echo "Applying the latest image to the Forumlify app container..."
"${compose[@]}" up -d --no-deps app
echo "Forumlify is now running with the latest image."
"${compose[@]}" ps app