Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config file on docker stack (within portainer) is not used #121

Closed
Disane87 opened this issue Mar 7, 2025 · 1 comment
Closed

Config file on docker stack (within portainer) is not used #121

Disane87 opened this issue Mar 7, 2025 · 1 comment

Comments

@Disane87
Copy link

Disane87 commented Mar 7, 2025

I have created a /autokuma.toml file to apply some genereic snippets like stated in #105 (the !snippets). But I don't get the config file right. My feeling is, that the config file is not used. I don't even see a read nor other stuff for that file in the RUST_LOGS.

Here is my entire stack with uptime-kuma:

services:
    
    autokuma:
      image: ghcr.io/bigboot/autokuma:latest
      container_name: autokuma
      restart: unless-stopped
      depends_on:
        uptime-kuma:
          condition: service_healthy
          restart: true
      environment:
        AUTOKUMA__KUMA__URL: http://192.168.11.25:3001  # URL zu deinem Uptime Kuma
        AUTOKUMA__KUMA__USERNAME: Disane
        AUTOKUMA__TAG_NAME: AutoKuma
        AUTOKUMA__KUMA__PASSWORD: ****
        AUTOKUMA__DOCKER__SOURCE: Both
        RUST_LOG: "kuma_client=trace"
      
      volumes:
        - /var/run/docker.sock:/var/run/docker.sock
        - /mnt/user/appdata/autokuma/autokuma.toml:/autokuma.toml
    
    
    uptime-kuma:
        container_name: UptimeKuma
        restart: unless-stopped
        networks:
            homelab:
              ipv4_address: 192.168.11.25
        environment:
            - TZ=Europe/Berlin
            - HOST_CONTAINERNAME=UptimeKuma
            - TCP_PORT_3001=3001
        labels:
            - net.unraid.docker.managed=dockerman
            - net.unraid.docker.webui=http://[IP]:[PORT:3001]
            - net.unraid.docker.icon=https://raw.githubusercontent.com/CorneliousJD/Docker-Templates/master/icons/uptimekuma.png
            - traefik.enable=true
            - traefik.subdomain=status
            - traefik.http.services.uptimekuma.loadbalancer.server.port=3001
            - traefik.http.routers.uptimekuma.middlewares=external-access@file
            # - traefik.docker.network=homelab
        volumes:
            - /mnt/user/appdata/uptimekuma:/app/data:rw
            - /var/run/docker.sock:/var/run/docker.sock:rw
        image: "louislam/uptime-kuma"
networks:
    homelab:
        external: true
        name: br3.11

Herre is my autokuma.toml:

[snippets]
"!traefik.enable" = '''
{% set label = container.Labels %}
{{ label["traefik.subdomain"] }}.http.name: {{ label["traefik.subdomain"] }}
{{ label["traefik.subdomain"] }}.http.url: https://{{ label["traefik.subdomain"] }}

{%- if label["service.domain"] %}
    .{{ label["service.domain"] }}
{% else %}
    .disane.dev
{% endif %}

{%- if label["service.path"] %}
    /{{ label["service.path"] }}
{% endif %}

{% if label["service.group"] %}
    {{ label["service.group"] }}.group.name: {{ label["service.group"] }}
    {{ label["traefik.subdomain"] }}.http.parent_name: {{ label["service.group"] }}
{% endif %}
'''

My goal is to automate the generation of monitors for all traefik.enable tags like described in the other issue.
I already saw #115 but thats not working.

Is there no log for readin and using the config file?

Edit:
I already used the master image but thats not working either.

@Disane87
Copy link
Author

Disane87 commented Mar 8, 2025

I have managed to figure it out. My config is read and used but my snippet doesn't seems to be applied. Can be closed 🙂

@Disane87 Disane87 closed this as completed Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant