# Local Development Configuration for Traefik # Usage: docker compose -f docker-compose.local.yml up -d # # This configuration is optimized for local development: # - Bridge network instead of host mode # - Port mappings: 8081:80 (HTTP) and 8093:8080 (API/Dashboard) # Note: 8443:443 is used by the web container, and we don't need HTTPS for Traefik locally # - No ACME/Let's Encrypt (HTTP-only) # - Simplified healthcheck services: traefik: image: traefik:v3.0 container_name: traefik-local restart: unless-stopped security_opt: - no-new-privileges:true # Use bridge network for local development (avoids port conflicts) # Ports 80/443 might be in use by other services # For local development, we only use HTTP (no HTTPS needed) # Note: 8443:443 is used by the web container ports: - "8081:80" # HTTP on port 80 (mapped to host port 8081) - "8093:8080" # Traefik API entrypoint (for api.insecure=true dashboard) environment: - TZ=Europe/Berlin command: # Load static configuration file - "--configFile=/traefik.yml" volumes: # Docker socket for service discovery - /var/run/docker.sock:/var/run/docker.sock:ro # Static configuration for local development - ./traefik.local.yml:/traefik.yml:ro # Dynamic configuration (shared with production config) # Note: These configs reference letsencrypt resolver which we don't configure locally # This will cause harmless errors in logs but won't break functionality - ./dynamic:/dynamic:ro networks: - traefik-public labels: # Note: With api.insecure=true, Traefik should automatically serve the dashboard # at /dashboard/ and /api/ without needing router labels. # However, if this doesn't work in bridge network mode, we may need explicit routing. # For now, we'll try without labels and see if api.insecure=true works directly. - "traefik.enable=true" healthcheck: # Use Traefik's built-in healthcheck command (works in minimal image) test: ["CMD", "traefik", "healthcheck", "--ping"] interval: 30s timeout: 10s retries: 3 start_period: 15s networks: traefik-public: external: true # Create this network if it doesn't exist: # docker network create traefik-public