mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2026-07-30 23:38:02 -04:00
- Replaced the All-in-One (AIO) deployment setup with a Standard Deployment configuration, introducing .env.advanced.example for advanced settings. - Updated .dockerignore to reflect the new environment file structure. - Removed .env.aio.example and associated references from documentation and workflows. - Enhanced installation instructions to clarify the new Standard Deployment process. - Updated GitHub Actions workflows to align with the new deployment structure, including smoke tests and image builds. - Improved documentation for environment variable references and deployment options.
90 lines
2.2 KiB
Bash
Executable File
90 lines
2.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# Main install orchestration.
|
|
set -euo pipefail
|
|
|
|
WIZARD_TOTAL=7
|
|
|
|
choose_setup_type() {
|
|
if [[ "${DRY_RUN:-false}" == true ]]; then
|
|
SETUP_TYPE="standard"
|
|
resolve_compose_settings
|
|
return 0
|
|
fi
|
|
print_step_header 2 "$WIZARD_TOTAL" "Choose setup type"
|
|
tui_print_box "Installation mode" \
|
|
"Standard Deployment is recommended for homelabs and quick installs.\nAdvanced Deployment gives separate frontend and backend services."
|
|
local choice
|
|
if ! choice="$(tui_choose "Which setup do you want?" \
|
|
"Standard Deployment — single URL, one port (recommended)" \
|
|
"Advanced Deployment — separate frontend and backend")"; then
|
|
choice="Standard Deployment — single URL, one port (recommended)"
|
|
fi
|
|
case "$choice" in
|
|
Advanced*)
|
|
SETUP_TYPE="advanced"
|
|
;;
|
|
*)
|
|
SETUP_TYPE="standard"
|
|
;;
|
|
esac
|
|
resolve_compose_settings
|
|
log_success "Selected $( [[ "$SETUP_TYPE" == "standard" ]] && echo "Standard Deployment" || echo "Advanced Deployment" ) setup"
|
|
}
|
|
|
|
run_fresh_install() {
|
|
init_tui
|
|
print_welcome
|
|
if [[ "${DRY_RUN:-false}" != true ]]; then
|
|
tui_press_enter "Press Enter to begin"
|
|
fi
|
|
|
|
print_screen "Installing AdventureLog"
|
|
run_preflight
|
|
|
|
if [[ -z "${SETUP_TYPE:-}" ]] || [[ "$SETUP_TYPE" == "standard" && -z "${SITE_URL:-}" ]]; then
|
|
choose_setup_type
|
|
fi
|
|
|
|
ensure_install_directory
|
|
|
|
if [[ "$SETUP_TYPE" == "standard" ]]; then
|
|
download_standard_toolkit
|
|
run_standard_install_wizard
|
|
write_env_standard
|
|
else
|
|
download_advanced_toolkit
|
|
run_advanced_install_wizard
|
|
write_env_advanced
|
|
fi
|
|
|
|
trap 'cleanup_on_failure; print_failure_message; exit 1' ERR
|
|
run_deploy_phase
|
|
save_credentials_file
|
|
|
|
if [[ "$SETUP_TYPE" == "standard" ]]; then
|
|
print_standard_success
|
|
else
|
|
print_advanced_success
|
|
fi
|
|
}
|
|
|
|
run_installer_main() {
|
|
if [[ "$FORCE_INSTALL" != true ]]; then
|
|
if [[ -d "$INSTALL_DIR" ]] && detect_existing_install "$INSTALL_DIR"; then
|
|
init_tui
|
|
if [[ "${ADVENTURELOG_MANAGE:-}" == "1" ]] || tui_confirm "Existing AdventureLog install detected. Open the management console?" "y"; then
|
|
INSTALL_DIR="$(cd "$INSTALL_DIR" && pwd)"
|
|
run_management_menu
|
|
return 0
|
|
fi
|
|
fi
|
|
if [[ "${ADVENTURELOG_MANAGE:-}" == "1" ]]; then
|
|
init_tui
|
|
run_management_menu
|
|
return 0
|
|
fi
|
|
fi
|
|
|
|
run_fresh_install
|
|
}
|