Configure portable Docker GID support to enable Docker container monitoring in Uptime Kuma. The DOCKER_GID environment variable allows the configuration to work across different servers where the docker group ID may vary. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
51 lines
1.6 KiB
YAML
51 lines
1.6 KiB
YAML
services:
|
|
uptime-kuma:
|
|
image: louislam/uptime-kuma:2.0.2-rootless
|
|
container_name: uptime-kuma
|
|
restart: unless-stopped
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
cap_drop:
|
|
- ALL
|
|
group_add:
|
|
- "${DOCKER_GID}"
|
|
networks:
|
|
- traefik-net
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.uptime-kuma.rule=Host(`${DOMAIN}`)"
|
|
- "traefik.http.routers.uptime-kuma.entrypoints=websecure"
|
|
- "traefik.http.routers.uptime-kuma.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.uptime-backend.loadbalancer.server.port=3001"
|
|
- "traefik.http.middlewares.uptime-security.headers.customFrameOptionsValue=SAMEORIGIN"
|
|
- "traefik.http.middlewares.uptime-security.headers.contentTypeNosniff=true"
|
|
- "traefik.http.middlewares.uptime-security.headers.browserXssFilter=true"
|
|
- "traefik.http.middlewares.uptime-security.headers.referrerPolicy=strict-origin-when-cross-origin"
|
|
- "traefik.http.routers.uptime-kuma.middlewares=uptime-security"
|
|
volumes:
|
|
- ./data:/app/data
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f http://localhost:3001 || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "0.5"
|
|
memory: 512M
|
|
reservations:
|
|
cpus: "0.25"
|
|
memory: 256M
|
|
|
|
networks:
|
|
traefik-net:
|
|
external: true
|