stefanprodan / swarmprom

Docker Swarm instrumentation with Prometheus, Grafana, cAdvisor, Node Exporter and Alert Manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to modify port

firehalt opened this issue · comments

Is all the ports on my current project occupied? How do I modify the ports and modify the configuration file

Only the Caddy service exposes ports so you can modify them here https://github.com/stefanprodan/swarmprom/blob/master/docker-compose.yml#L184

Modify the following ports
caddy:
image: stefanprodan/caddy
ports:
- "3000:3000"
- "9090:9090"
- "9093:9093"
- "9094:9094"

After modification
caddy:
image: stefanprodan/caddy
ports:
- "3000:3000"
- "9097:9090"
- "9098:9093"
- "9099:9094"

docker-compose.yml File call dockerd-exporter/Caddyfile,and dockerd-exporter/Caddyfile The 9093 port is defined.

The ports mentioned in your file are used. If I want to continue using them, I should modify them.