mirror of
https://gitlab.w-hs.de/an14051/backerup-website.git
synced 2026-07-27 17:35:29 +00:00
Initial Commit
This commit is contained in:
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user