feat: Add Option 3 - Deploy Additional Server with multi-server support
Major features:
- Automated SSH key setup between remote and core servers
- Docker TLS configuration with shared CA certificates
- Automatic deployment of Dockge, Traefik, Sablier, and Infrastructure stacks
- Copy all stacks (except core) to remote server for on-demand deployment
- New standalone Traefik stack for remote server container discovery
- Locale-aware SSH/SCP commands to handle Raspberry Pi warnings
- Variable expansion support in .env files (${VAR} references)
- Comprehensive error handling and verbose deployment logging
Technical improvements:
- setup_ssh_key_to_core() - Automated RSA 4096-bit key generation and installation
- setup_multi_server_tls() - Fetch shared CA from core server via SSH
- copy_all_stacks_for_remote() - Deploy all stacks except core
- deploy_traefik_stack() - Local Traefik for container discovery
- Enhanced localization with envsubst support
- Docker network creation (traefik-network, homelab-network)
- Password authentication with special character handling
Fixes:
- Fixed SSH key path handling for non-root users
- Fixed SCP exit code checking (was checking grep instead of scp)
- Fixed CA file detection with proper test commands
- Removed unnecessary prepare_deployment() function call
- Added ACTUAL_USER variable initialization for remote deployments
This commit is contained in:
16
.env.example
16
.env.example
@@ -10,14 +10,7 @@ TZ=America/New_York
|
||||
|
||||
# Servers configuration
|
||||
SERVER_IP=192.168.1.100 # This server
|
||||
SERVER_HOSTNAME=debian
|
||||
|
||||
# If deploying with option 3: Remote Core Server
|
||||
# the REMOTE_SERVER is where the Core Stack (Traefik) is running
|
||||
REMOTE_SERVER_IP=your.remote.ip.address
|
||||
REMOTE_SERVER_HOSTNAME=your-remote-server
|
||||
REMOTE_SERVER_USER=${DEFAULT_USER}
|
||||
REMOTE_SERVER_PASSWORD=${DEFAULT_PASSWORD}
|
||||
SERVER_HOSTNAME=debian
|
||||
|
||||
# Domain Configuration
|
||||
DUCKDNS_SUBDOMAINS=yourdomain # Without .duckdns.org
|
||||
@@ -35,6 +28,13 @@ MEDIADIR=/mnt/media # Large media files on separate drive
|
||||
DOWNLOADDIR=/mnt/downloads # Downloads on separate drive
|
||||
PROJECTDIR=~/projects # User's projects folder
|
||||
|
||||
# If selecting option 3: Deploy Additional Server
|
||||
# the CORE_SERVER is where the Core Traefik is running
|
||||
CORE_SERVER_IP=192.168.1.101
|
||||
CORE_SERVER_HOSTNAME=debian2
|
||||
CORE_SERVER_USER=${DEFAULT_USER}
|
||||
CORE_SERVER_PASSWORD=${DEFAULT_PASSWORD}
|
||||
|
||||
# ##########################################
|
||||
# #### NOTEABLE OPTIONAL CONFIGURATIONS ####
|
||||
|
||||
|
||||
Reference in New Issue
Block a user