version: '3.3'

services:
  uptime-kuma:
    image: louislam/uptime-kuma
    container_name: uptime-kuma${USER_ID:-1}
    volumes:
      - uptime-kuma:/app/data
    logging:
      options:
        max-size: '12m'
        max-file: '5'
      driver: json-file
    labels:
      - traefik.enable=true
      - traefik.http.routers.kuma${USER_ID:-1}.rule=Host(`${URL_KUMA}`)
      - traefik.http.routers.kuma${USER_ID:-1}.entrypoints=websecure
      - traefik.http.routers.kuma${USER_ID:-1}.tls=true
      - traefik.http.routers.kuma${USER_ID:-1}.tls.certresolver=lets-encrypt
      - traefik.http.services.kuma${USER_ID:-1}.loadbalancer.server.port=3001
    networks:
      - traefik-proxy
    restart: always

networks:
  traefik-proxy:
    external:
      name: ${NETWORK_TRAEFIK}
       
volumes:
  uptime-kuma:
    driver: local
    driver_opts:
      type: none
      device: ${VOLUME_KUMA}
      o: bind
