Add --only <service> single-service deploy mode
Sources existing credentials file and redeploys just the named service without running the full interactive installer. Works for any service: postgres auth portal npm management noticeboard settings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fde4fa3115
commit
259a1457aa
1 changed files with 28 additions and 0 deletions
|
|
@ -946,6 +946,34 @@ SUMMARY
|
|||
# ════════════════════════════════════════════════════════════════════════════
|
||||
# ENTRY POINT
|
||||
# ════════════════════════════════════════════════════════════════════════════
|
||||
|
||||
# Single-service mode: install-stack.sh --only <service>
|
||||
# Sources existing credentials and redeploys just the named service.
|
||||
if [[ "${1:-}" == "--only" ]]; then
|
||||
ONLY="${2:-}"
|
||||
VALID="postgres auth portal npm management noticeboard settings"
|
||||
[[ -z "$ONLY" ]] && msg_error "Usage: install-stack.sh --only <service> (one of: ${VALID})"
|
||||
grep -qw "$ONLY" <<< "$VALID" || msg_error "Unknown service '${ONLY}'. Valid: ${VALID}"
|
||||
CREDS_FILE=/root/hotel-manage-credentials.txt
|
||||
[[ -f "$CREDS_FILE" ]] || msg_error "No credentials file at ${CREDS_FILE} — run the full installer first"
|
||||
set -a; source <(grep -v '^#' "$CREDS_FILE" | grep '='); set +a
|
||||
USE_FORGEJO=true
|
||||
[[ -f /root/.ssh/hotel-manage_deploy.pub ]] \
|
||||
&& MGMT_PUBKEY=$(cat /root/.ssh/hotel-manage_deploy.pub) || MGMT_PUBKEY=""
|
||||
check_vmbr1
|
||||
ensure_pool
|
||||
case "$ONLY" in
|
||||
postgres) deploy_postgres ;;
|
||||
auth) deploy_auth ;;
|
||||
portal) deploy_portal ;;
|
||||
npm) deploy_npm ;;
|
||||
management) deploy_management ;;
|
||||
noticeboard) deploy_noticeboard ;;
|
||||
settings) deploy_settings ;;
|
||||
esac
|
||||
exit 0
|
||||
fi
|
||||
|
||||
check_vmbr1
|
||||
collect_config
|
||||
gen_secrets
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue