#!/usr/bin/env bash # deploy.sh — spin up (or update) the Nexus staging environment # Usage: ./deploy.sh — rebuild and restart nexus-main (port 4200) # ./deploy.sh staging — rebuild and restart nexus-staging (port 4201) set -euo pipefail SERVICE="${1:-nexus-main}" case "$SERVICE" in staging) SERVICE="nexus-staging" ;; main) SERVICE="nexus-main" ;; esac echo "==> Deploying $SERVICE …" docker compose build "$SERVICE" docker compose up -d --force-recreate "$SERVICE" echo "==> Done. Container: $SERVICE"