Fix Option 3: Create traefik-network and improve sed patterns

Issue: Option 3 deployment failed because traefik-network wasn't created,
but the cleanup function didn't properly strip network references from files.

Changes:
- scripts/ez-homelab.sh: Add traefik-network creation in Step 2
  (Network is harmless if unused - prevents docker compose errors)
- Improve sed patterns in configure_remote_server_routing():
  * Use anchored patterns (^ and $) to match exact lines
  * Fix network removal regex to match indentation correctly

The traefik-network will exist but remain unused on additional servers.
Services are accessed via core Traefik's manual HTTP routes.
This commit is contained in:
Kelin
2026-02-07 22:22:52 -05:00
parent 16f7eaa703
commit 043e1cb64a
2 changed files with 11 additions and 10 deletions

View File

@@ -38,7 +38,7 @@ services:
- 'homelab.description=Docker Compose stack manager'
- 'traefik.enable=true'
- 'traefik.docker.network=traefik-network'
- 'traefik.http.routers.dockge.rule=Host(`dockge.${DOMAIN}`)'
- 'traefik.http.routers.dockge.rule=Host(`dockge.${SERVER_HOSTNAME}.${DOMAIN}`)'
- 'traefik.http.routers.dockge.entrypoints=websecure'
- 'traefik.http.routers.dockge.tls.certresolver=letsencrypt'
- 'traefik.http.routers.dockge.middlewares=authelia@docker'