Skip to content

Instantly share code, notes, and snippets.

@coryschwartz
Created November 8, 2019 21:12
Show Gist options
  • Save coryschwartz/afcdba4de51cc503c998f532e51659a9 to your computer and use it in GitHub Desktop.
Save coryschwartz/afcdba4de51cc503c998f532e51659a9 to your computer and use it in GitHub Desktop.
IPFS with prometheus host monitoring
version: '3'
volumes:
acme:
ipfs-data:
networks:
ipfsnet:
monitornet:
services:
traefik:
container_name: reverse-proxy
image: traefik:latest
restart: unless-stopped
networks:
- ipfsnet
- monitornet
ports:
- 80:80/tcp
- 443:443/tcp
- 127.0.0.1:8080:8080/tcp
command:
- "--log.level=DEBUG"
- "--providers.docker=true"
- "--api.insecure=true"
- "--entrypoints.web.address=:80"
# - "--acme"
# - "--acme.storage=/acme/acme.json"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- acme:/acme
ipfs:
container_name: go-ipfs
image: ipfs/go-ipfs:latest
restart: unless-stopped
networks:
- ipfsnet
volumes:
- ipfs-data:/data/ipfs
ports:
- 4001:4001/tcp
- 4001:4001/udp
- 127.0.0.1:5001:5001/tcp
labels:
- "traefik.enable=true"
- "traefik.http.services.go-ipfs.loadbalancer.server.port=8080"
- "traefik.http.routers.go-ipfs.rule=Host(`ipfs.localhost`)"
- "traefik.http.routers.go-ipfs.entrypoints=web"
monitoring:
container_name: node-exporter
image: prom/node-exporter
restart: unless-stopped
networks:
- monitornet
labels:
- "traefik.enable=true"
- "traefik.http.services.node-exporter.loadbalancer.server.port=9100"
- "traefik.http.routers.node-exporter.rule=Host(`metrics.localhost`)"
- "traefik.http.routers.node-exporter.entrypoints=web"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment