Skip to content

Instantly share code, notes, and snippets.

@paulknulst
Created October 22, 2022 21:16
Embed
What would you like to do?
Uptime Kuma Docker Compose file to run in a Docker Swarm with Traefik reverse proxy.
version: '3.6'
services:
uptime-kuma:
image: louislam/uptime-kuma:latest
container_name: uptime-kuma
volumes:
- data:/app/data
restart: always
networks:
- traefik-public
deploy:
placement:
constraints:
- node.labels.monitor == true
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.constraint-label=traefik-public
- traefik.http.routers.uptime-kuma-http.rule=Host(`monitor.${PRIMARY_DOMAIN?Variable not set}`)
- traefik.http.routers.uptime-kuma-http.entrypoints=http
- traefik.http.routers.uptime-kuma-http.middlewares=https-redirect
- traefik.http.routers.uptime-kuma-https.rule=Host(`monitor.${PRIMARY_DOMAIN?Variable not set}`)
- traefik.http.routers.uptime-kuma-https.entrypoints=https
- traefik.http.routers.uptime-kuma-https.tls=true
- traefik.http.routers.uptime-kuma-https.tls.certresolver=le
- traefik.http.services.uptime-kuma.loadbalancer.server.port=3001
networks:
traefik-public:
external: true
volumes:
data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment