amir20 / dozzle

Realtime log viewer for docker containers.
https://dozzle.dev/
MIT License
6.15k stars 308 forks source link

Globally Deployed Dozzle With Swarm Mode Needs the service to be named dozzle or it doesn't work #3079

Closed githubbiswb closed 4 months ago

githubbiswb commented 4 months ago

Describe the bug If you name the service in the stack anything other than dozzle you get

level=fatal msg="error looking up swarm services: lookup tasks.dozzle on 127.0.0.11:53: no such host"

To Reproduce Make a service with a different name than dozzle, like dozzleme and this issue occurs

Expected behavior It to work regardless of the service name

Desktop (please complete the following information):

My config for refrence

services:
  dozzleme:
    image: dockreg.biswb.com:5000/amir20-dozzle:070824
    environment:
      DOZZLE_MODE: swarm
      DOZZLE_AUTH_PROVIDER: simple
    networks:
      - DockInternalComms      
    volumes:
      - data:/data
      - /var/run/docker.sock:/var/run/docker.sock:ro
    deploy:
      mode: global
      update_config:
        delay: 20s
        failure_action: rollback     

networks:
  DockInternalComms:
    external: true
amir20 commented 4 months ago

Yep. +1. I think I have to look myself up using Docker API by ID and get service name. But it was too much work.

Not sure if I will get to it soon. If you can update the docs with a tip or something I would really appreciate it.

githubbiswb commented 4 months ago

I tried doing an edit here

https://dozzle.dev/guide/swarm-mode

It says I need to fork it first, which doesn't seem like what we are trying to do

amir20 commented 4 months ago

Yes, you need to fork and send a PR.

githubbiswb commented 4 months ago

ah, well I am revealed then, that is not something I actually have done before or know how to do. Happy to do it if you want to guide me, also can understand if you don't have the time for that.