Files
backerup-website/docker/deploy.sh
T
Anders Böttcher 50566f2a22 Initial Commit
2026-05-11 23:39:16 +02:00

23 lines
688 B
Bash
Executable File

#!/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"