Files
EZ-Homelab/docker-compose/dockge/docker-compose.yml
Kelin 043e1cb64a 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.
2026-02-07 22:22:52 -05:00

51 lines
1.7 KiB
YAML

# Dockge Stack
# RESTART POLICY GUIDE:
# - unless-stopped: Core infrastructure services that should always run
# - no: Services with Sablier lazy loading (start on-demand)
# - See individual service comments for specific reasoning
services:
# Dockge - Docker Compose Stack Manager
# Stack management interface should always run for container management
dockge:
image: louislam/dockge:1
deploy:
resources:
limits:
cpus: '0.50'
memory: 256M
pids: 512
reservations:
cpus: '0.25'
memory: 128M
container_name: dockge
restart: unless-stopped
networks:
- homelab-network
- traefik-network
ports:
- '5001:5001' # Optional: direct access
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/stacks:/opt/stacks # Dockge manages stacks in this directory
- ./data:/app/data
- /usr/bin/docker:/usr/bin/docker:ro # Mount docker binary for CLI access
environment:
- DOCKGE_STACKS_DIR=/opt/stacks
- DOCKGE_ENABLE_CONSOLE=true
labels:
- 'homelab.category=infrastructure'
- 'homelab.description=Docker Compose stack manager'
- 'traefik.enable=true'
- 'traefik.docker.network=traefik-network'
- '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'
- 'traefik.http.services.dockge.loadbalancer.server.port=5001'
networks:
homelab-network:
external: true
traefik-network:
external: true