Round 9: Homepage variable replacement and additional stack deployment
Features added: ✅ Homepage config variable replacement - Fixed HOMEPAGE_VAR_DOMAIN substitution - Homepage doesn't support environment variables in configs - Deploy script now uses sed to replace {{HOMEPAGE_VAR_DOMAIN}} with actual domain - All homepage/*.yaml files processed after template copy ✅ Additional stacks deployment to Dockge - 7 additional stacks now copied to /opt/stacks/: media, media-extended, homeassistant, productivity, monitoring, utilities, alternatives - Stacks are NOT started automatically - user deploys via Dockge UI as needed - Optional image pre-pull with user prompt (defaults to no) - Significantly improves first-time Dockge experience ✅ Watchtower temporarily disabled - Documented Docker API v1.44 compatibility issue with Docker 29.x - Added clear instructions for re-enabling when issue is resolved - Infrastructure stack now deploys 6 services (was 7) Deployment workflow: 1. Core stack (4 services) - DuckDNS, Traefik, Authelia, Gluetun 2. Infrastructure stack (6 services) - Dockge, Pi-hole, Dozzle, Glances, Docker Proxy 3. Dashboards stack (2 services) - Homepage (configured), Homarr 4. Additional stacks (7 stacks copied, not started) Tested: All 11 active containers healthy, all stacks visible in Dockge
This commit is contained in:
@@ -67,25 +67,31 @@ services:
|
|||||||
- "traefik.http.services.pihole.loadbalancer.server.port=80"
|
- "traefik.http.services.pihole.loadbalancer.server.port=80"
|
||||||
|
|
||||||
# Watchtower - Automatic container updates
|
# Watchtower - Automatic container updates
|
||||||
# Runs silently in background, no UI
|
# TEMPORARILY DISABLED: Docker API version incompatibility with Docker 29.x
|
||||||
watchtower:
|
# Watchtower versions have API compatibility issues:
|
||||||
image: containrrr/watchtower:1.7.2
|
# - v1.7.1: Uses API v1.25 (too old for Docker 29.x which requires min v1.44)
|
||||||
container_name: watchtower
|
# - v1.7.2+/latest: Has issues with API negotiation
|
||||||
restart: unless-stopped
|
# Issue tracked for resolution in future release
|
||||||
networks:
|
# To enable: Uncomment service below and run: docker compose up -d watchtower
|
||||||
- homelab-network
|
#
|
||||||
volumes:
|
# watchtower:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
# image: containrrr/watchtower:1.7.1
|
||||||
environment:
|
# container_name: watchtower
|
||||||
- DOCKER_API_VERSION=1.44
|
# restart: unless-stopped
|
||||||
- WATCHTOWER_CLEANUP=true
|
# networks:
|
||||||
- WATCHTOWER_INCLUDE_RESTARTING=true
|
# - homelab-network
|
||||||
- WATCHTOWER_SCHEDULE=0 0 4 * * * # 4 AM daily
|
# volumes:
|
||||||
- WATCHTOWER_NOTIFICATIONS=shoutrrr
|
# - /var/run/docker.sock:/var/run/docker.sock
|
||||||
- WATCHTOWER_NOTIFICATION_URL=${WATCHTOWER_NOTIFICATION_URL}
|
# environment:
|
||||||
labels:
|
# - DOCKER_API_VERSION=1.44
|
||||||
- "homelab.category=infrastructure"
|
# - WATCHTOWER_CLEANUP=true
|
||||||
- "homelab.description=Automatic Docker container updates"
|
# - WATCHTOWER_INCLUDE_RESTARTING=true
|
||||||
|
# - WATCHTOWER_SCHEDULE=0 0 4 * * * # 4 AM daily
|
||||||
|
# - WATCHTOWER_NOTIFICATIONS=shoutrrr
|
||||||
|
# - WATCHTOWER_NOTIFICATION_URL=${WATCHTOWER_NOTIFICATION_URL}
|
||||||
|
# labels:
|
||||||
|
# - "homelab.category=infrastructure"
|
||||||
|
# - "homelab.description=Automatic Docker container updates"
|
||||||
|
|
||||||
# Dozzle - Real-time Docker log viewer
|
# Dozzle - Real-time Docker log viewer
|
||||||
# Access at: https://dozzle.${DOMAIN}
|
# Access at: https://dozzle.${DOMAIN}
|
||||||
|
|||||||
@@ -298,10 +298,10 @@ echo ""
|
|||||||
log_info "Step 4/6: Deploying infrastructure stack..."
|
log_info "Step 4/6: Deploying infrastructure stack..."
|
||||||
log_info " - Dockge (Docker Compose Manager)"
|
log_info " - Dockge (Docker Compose Manager)"
|
||||||
log_info " - Pi-hole (DNS Ad Blocker)"
|
log_info " - Pi-hole (DNS Ad Blocker)"
|
||||||
log_info " - Watchtower (Container Updates)"
|
|
||||||
log_info " - Dozzle (Log Viewer)"
|
log_info " - Dozzle (Log Viewer)"
|
||||||
log_info " - Glances (System Monitor)"
|
log_info " - Glances (System Monitor)"
|
||||||
log_info " - Docker Proxy (Security)"
|
log_info " - Docker Proxy (Security)"
|
||||||
|
log_info " Note: Watchtower temporarily disabled (Docker API compatibility)"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Copy infrastructure stack
|
# Copy infrastructure stack
|
||||||
@@ -326,10 +326,15 @@ mkdir -p /opt/stacks/dashboards
|
|||||||
cp "$REPO_DIR/docker-compose/dashboards.yml" /opt/stacks/dashboards/docker-compose.yml
|
cp "$REPO_DIR/docker-compose/dashboards.yml" /opt/stacks/dashboards/docker-compose.yml
|
||||||
cp "$REPO_DIR/.env" /opt/stacks/dashboards/.env
|
cp "$REPO_DIR/.env" /opt/stacks/dashboards/.env
|
||||||
|
|
||||||
# Copy homepage config templates
|
# Copy and configure homepage templates
|
||||||
if [ -d "$REPO_DIR/config-templates/homepage" ]; then
|
if [ -d "$REPO_DIR/config-templates/homepage" ]; then
|
||||||
cp -r "$REPO_DIR/config-templates/homepage" /opt/stacks/dashboards/
|
cp -r "$REPO_DIR/config-templates/homepage" /opt/stacks/dashboards/
|
||||||
log_info "Homepage configuration templates copied"
|
|
||||||
|
# Replace HOMEPAGE_VAR_DOMAIN with actual domain in all homepage config files
|
||||||
|
# Homepage doesn't support environment variables in configs
|
||||||
|
find /opt/stacks/dashboards/homepage -type f \( -name "*.yaml" -o -name "*.yml" \) -exec sed -i "s/{{HOMEPAGE_VAR_DOMAIN}}/${DOMAIN}/g" {} \;
|
||||||
|
|
||||||
|
log_info "Homepage configuration templates copied and configured"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Deploy dashboards stack
|
# Deploy dashboards stack
|
||||||
@@ -339,8 +344,45 @@ docker compose up -d
|
|||||||
log_success "Dashboards stack deployed"
|
log_success "Dashboards stack deployed"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Step 6: Wait for Dockge to be ready and open browser
|
# Step 6: Deploy additional stacks to Dockge (not started)
|
||||||
log_info "Step 6/6: Waiting for Dockge web UI to be ready..."
|
log_info "Step 6/7: Preparing additional stacks for Dockge..."
|
||||||
|
echo ""
|
||||||
|
log_info "The following stacks can be deployed through Dockge's web UI:"
|
||||||
|
log_info " - media.yml (Plex, Jellyfin, Sonarr, Radarr, etc.)"
|
||||||
|
log_info " - media-extended.yml (Readarr, Lidarr, etc.)"
|
||||||
|
log_info " - homeassistant.yml (Home Assistant and accessories)"
|
||||||
|
log_info " - productivity.yml (Nextcloud, Gitea, wikis)"
|
||||||
|
log_info " - monitoring.yml (Grafana, Prometheus, etc.)"
|
||||||
|
log_info " - utilities.yml (Backups, code editors, etc.)"
|
||||||
|
log_info " - alternatives.yml (Portainer, Authentik)"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Ask user if they want to pre-pull images for additional stacks
|
||||||
|
read -p "Pre-pull Docker images for additional stacks? This will take time but speeds up first deployment (y/N): " PULL_IMAGES
|
||||||
|
PULL_IMAGES=${PULL_IMAGES:-n}
|
||||||
|
|
||||||
|
# Copy additional stacks to Dockge directory
|
||||||
|
ADDITIONAL_STACKS=("media" "media-extended" "homeassistant" "productivity" "monitoring" "utilities" "alternatives")
|
||||||
|
|
||||||
|
for stack in "${ADDITIONAL_STACKS[@]}"; do
|
||||||
|
mkdir -p "/opt/stacks/$stack"
|
||||||
|
cp "$REPO_DIR/docker-compose/${stack}.yml" "/opt/stacks/$stack/docker-compose.yml"
|
||||||
|
cp "$REPO_DIR/.env" "/opt/stacks/$stack/.env"
|
||||||
|
|
||||||
|
# Pre-pull images if requested
|
||||||
|
if [[ "$PULL_IMAGES" =~ ^[Yy]$ ]]; then
|
||||||
|
log_info "Pulling images for $stack stack..."
|
||||||
|
cd "/opt/stacks/$stack"
|
||||||
|
docker compose pull 2>&1 | grep -E '(Pulling|Downloaded|Already exists|up to date)' || true
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
log_success "Additional stacks prepared in Dockge"
|
||||||
|
log_info "These stacks are NOT started - deploy them via Dockge web UI as needed"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Step 7: Wait for Dockge to be ready and open browser
|
||||||
|
log_info "Step 7/7: Waiting for Dockge web UI to be ready..."
|
||||||
|
|
||||||
DOCKGE_URL="https://dockge.${DOMAIN}"
|
DOCKGE_URL="https://dockge.${DOMAIN}"
|
||||||
MAX_WAIT=60 # Maximum wait time in seconds
|
MAX_WAIT=60 # Maximum wait time in seconds
|
||||||
|
|||||||
Reference in New Issue
Block a user