feat: add additional port mapping for Traefik and update Prometheus scrape config to use static targets

This commit is contained in:
2026-07-12 10:41:03 +08:00
parent bbe7725346
commit c4da70db26
2 changed files with 6 additions and 5 deletions
+3
View File
@@ -46,6 +46,9 @@ services:
- target: 8033
published: 8033
mode: host
- target: 8082
published: 8082
mode: host
deploy:
placement:
constraints:
+3 -5
View File
@@ -12,10 +12,8 @@ scrape_configs:
# Scrape Traefik Prometheus metrics
# Both services are on the traefik-public overlay network.
# Traefik is in the 'core' stack, so the Swarm DNS name is core_traefik.
# Traefik is in the 'core' stack; scrape via service VIP for stability.
# Metrics are served on the dedicated "metrics" entrypoint (port 8082).
- job_name: 'traefik'
dns_sd_configs:
- names: ['core_traefik']
type: 'A'
port: 8082
static_configs:
- targets: ['core_traefik:8082']