amir20 / dozzle

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

Even more simpler authentication needed #3328

Closed marcwittke closed 1 week ago

marcwittke commented 1 week ago

Describe the feature you would like to see

I would like to use dozzle in docker compose without the need for a /data/users.yml file in a volume

Describe how you would like to see this feature implemented

solution could look like this:

  logviewer:
    image: amir20/dozzle:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      DOZZLE_USERNAME: admin
      DOZZLE_PASSWORD: "Pa$$w0rd"

Describe any alternatives you've considered

I considered:

amir20 commented 1 week ago

This is not something I plan to do. See https://github.com/amir20/dozzle/issues/2630.

marcwittke commented 1 week ago

Maybe I did not make it clear: I don't want another authentication to be in place, I just want to be able to create the users.yml on the fly on application start

amir20 commented 1 week ago

Oh I see. That was not clear from your request.

I would want to understand your usecase since authentication is a sensitive subject and auto generating might bypass something the user does not want.

You can use dozzle generate as documented.

If you want to automate the whole process then you could do something like:

FROM amir20/dozzle

RUN /dozzle generate username --password password > /data/users.yml

ENTRYPOINT ["/dozzle"]

I have not tested this. It should work but I am intentionally not documenting this because Dozzle does expect /data to be mounted with authentication as that's how it does it's storage. Also, you have to docker build and deploy it yourself. It's not that great because you'll have to build Dozzle with each version.

Again, understanding your useecase would be insightful here.