feat: Add comprehensive restart policy documentation and Sablier lazy loading support
- Add SERVER_HOSTNAME env var for Sablier group naming - Update default hostname from 'jarvis' to 'debian' for generic repo compatibility - Add restart policy documentation to all docker-compose files - Add Sablier labels to lazy-loaded services (jellyfin, dozzle, glances, code-server, homarr, dokuwiki) - Update sablier.yml template to use debian- prefixes - Enhance deploy script to auto-detect hostname and update configurations - Ensure all YAML files remain syntactically valid
This commit is contained in:
@@ -218,6 +218,23 @@ if [ "$DEPLOY_CORE" = true ]; then
|
||||
fi
|
||||
cp -r "$REPO_DIR/config-templates/traefik" /opt/stacks/core/
|
||||
|
||||
# Detect server hostname and update configuration
|
||||
log_info "Detecting server hostname..."
|
||||
DETECTED_HOSTNAME=$(hostname)
|
||||
if [ -n "$DETECTED_HOSTNAME" ] && [ "$DETECTED_HOSTNAME" != "debian" ]; then
|
||||
log_info "Detected hostname: $DETECTED_HOSTNAME"
|
||||
# Update SERVER_HOSTNAME in the copied .env file
|
||||
sed -i "s/SERVER_HOSTNAME=.*/SERVER_HOSTNAME=$DETECTED_HOSTNAME/" /opt/stacks/core/.env
|
||||
# Update SERVER_HOSTNAME in the source .env file for future deployments
|
||||
sed -i "s/SERVER_HOSTNAME=.*/SERVER_HOSTNAME=$DETECTED_HOSTNAME/" "$REPO_DIR/.env"
|
||||
# Update sablier.yml with detected hostname
|
||||
sed -i "s/debian-/$DETECTED_HOSTNAME-/g" /opt/stacks/core/traefik/dynamic/sablier.yml
|
||||
log_success "Updated configuration with detected hostname: $DETECTED_HOSTNAME"
|
||||
else
|
||||
log_info "Using default hostname 'debian' (hostname detection failed or returned default)"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
if [ -d "/opt/stacks/core/authelia" ]; then
|
||||
log_warning "Authelia configuration already exists in /opt/stacks/core/"
|
||||
log_info "Creating backup: authelia.backup.$(date +%Y%m%d_%H%M%S)"
|
||||
|
||||
Reference in New Issue
Block a user