BigBoot / AutoKuma

AutoKuma is a utility that automates the creation of Uptime Kuma monitors based on Docker container labels. With AutoKuma, you can eliminate the need for manual monitor creation in the Uptime Kuma UI.
MIT License
309 stars 15 forks source link

AUTOKUMA__KUMA__DEFAULT_SETTINGS is not being used #13

Closed lsalazarm99 closed 8 months ago

lsalazarm99 commented 8 months ago

I have the following service definition:

autokuma:
  image: ghcr.io/bigboot/autokuma:latest
  depends_on:
    - uptime-kuma
  environment:
    AUTOKUMA__KUMA__URL: http://uptime-kuma:3001
    AUTOKUMA__KUMA__USERNAME: ${UPTIME_KUMA_USERNAME}
    AUTOKUMA__KUMA__PASSWORD: ${UPTIME_KUMA_PASSWORD}
    AUTOKUMA__KUMA__DEFAULT_SETTINGS: |-
      docker.docker_container: {{container_name}}
      docker.docker_host: 1
      http.max_retries: 3
  labels:
    diun.enable: "true"
    kuma.autokuma.docker.name: AutoKuma
  networks:
    - uptime_kuma_network
  restart: unless-stopped
  volumes:
    - /var/run/docker.sock:/var/run/docker.sock:ro

When I launch the service, a monitor is created in Uptime Kuma for AutoKuma, but it uses only the settings from the labels (so, without the docker_container and docker_host settings). If I explicitly add the docker_container label, the monitor is created with that setting.

image

lsalazarm99 commented 8 months ago

I went to the releases page and noticed that since v0.3.0 the variable name was changed to AUTOKUMA__DEFAULT_SETTINGS . That solved the issue.

BigBoot commented 8 months ago

Thanks I've update the example to use the correct variables