From f8f885a49987f5de17f3dfc6abe330ce43ed61da Mon Sep 17 00:00:00 2001 From: null Date: Wed, 20 May 2026 22:30:37 -0500 Subject: [PATCH] chore: add docker-test.sh (clean rebuild script), remove docker-push.sh --- scripts/docker-test.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 scripts/docker-test.sh diff --git a/scripts/docker-test.sh b/scripts/docker-test.sh new file mode 100755 index 0000000..9aec0a4 --- /dev/null +++ b/scripts/docker-test.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# docker-test.sh — Rebuild and redeploy Pipeline locally from scratch. +# Clears all Docker cache before building to ensure a clean slate. +set -euo pipefail + +cd "$(git rev-parse --show-toplevel)" + +echo "=== Stopping and removing existing containers, images, volumes ===" +docker compose down --rmi all --volumes --remove-orphans 2>/dev/null || true + +echo "=== Pruning all dangling Docker resources ===" +docker system prune -a --volumes -f + +echo "=== Removing Pipeline build cache ===" +docker builder prune -f 2>/dev/null || true + +echo "=== Building and starting all containers ===" +docker compose up --build -d + +echo "=== Waiting for services to be healthy ===" +sleep 5 + +echo "=== Checking container status ===" +docker compose ps + +echo "" +echo "=== Deploy complete ===" +echo "Frontend: http://localhost:3030" +echo "Backend: http://localhost:8001" \ No newline at end of file