#!/usr/bin/env bash # deploy.sh — Build the image and start (or restart) the local stack. # Usage: ./docker/deploy.sh [TAG] # TAG defaults to "backerup-website:latest" set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" TAG="${1:-backerup-website:latest}" # 1. Build "$SCRIPT_DIR/build.sh" "$TAG" # 2. Export the image tag so docker compose picks it up if you override it export BACKERUP_IMAGE="$TAG" # 3. Bring the stack up (recreate on image change) echo "==> Starting stack via docker compose…" docker compose \ --file "$SCRIPT_DIR/docker-compose.yml" \ up --detach --pull never --remove-orphans echo "==> Backerup website is running at http://localhost:3000"