Code Monkey home page Code Monkey logo

Comments (11)

kmlucy avatar kmlucy commented on August 18, 2024 1

That seems to have fixed this issue, but revealed another. I've opened #6, but this one look fixed. Thanks for the quick turnaround!

from dozzle.

amir20 avatar amir20 commented on August 18, 2024

@kmlucy This is not possible right now. But it wouldn't be too hard to add it. Before doing it, I want to make sure I understand your use case. I think in Docker you can only bound one container to each port. So I am wondering why it would be useful to have this running on /dozzle instead when it will have to be also another port anyway. Let me know if I am not understanding your use case.

from dozzle.

kmlucy avatar kmlucy commented on August 18, 2024

I have it running behind a reverse proxy so I would like to be able to access it at https://URL/dozzle. The alternative is to create another subdomain. While that is possible, I would greatly prefer to just have it in a subdirectory instead.

from dozzle.

amir20 avatar amir20 commented on August 18, 2024

If you are already running it behind a revery proxy then wouldn't it be possible to map /dozzle to locahost:8080/? Or is that not possible?

from dozzle.

kmlucy avatar kmlucy commented on August 18, 2024

It is possible to map it, yes, but it doesn't work for any hardcoded paths. So when it tries to get something like /styles.css, it can't find it.

For this specific instance, the application doesn't load because it is looking for /main.4b8b43b8.js and /main.943eb0cf.css instead of /dozzle/main.4b8b43b8.js and /dozzle/main.943eb0cf.css.

from dozzle.

amir20 avatar amir20 commented on August 18, 2024

ahhh. I see. Ok, that makes more sense. I thought that might be the problem but I wasn't sure. Let me see if I can make it easy to fix that.

from dozzle.

kmlucy avatar kmlucy commented on August 18, 2024

Awesome, thanks!

from dozzle.

amir20 avatar amir20 commented on August 18, 2024

@kmlucy can you try with https://github.com/amir20/dozzle/releases/tag/v1.2.0? It should work now with --base option which is documented in the readme file.

Please let me know how it goes! And thanks for the feedback.

from dozzle.

GTANAdam avatar GTANAdam commented on August 18, 2024

Ok, so how to pass the --base variable in docker-compose? why not just use environment variables?

UPDATE: Given the unusual use of arguments, I've managed to circumvent rebuilding the project to use environment variables (i.e: os.Getenv("ADDR")), I figured docker-compose could handle passing the arguments via command: https://docs.docker.com/compose/compose-file/#command

for example:

dockerlogs:
image: amir20/dozzle:latest
container_name: dockerlogs
restart: always
command: --base /dockerlogs
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro

from dozzle.

amir20 avatar amir20 commented on August 18, 2024

I was going to suggest using command. The reason I hadn't done a lot in in ENV is because I have also released this project as binary. Which makes more sense than ENV.

It wouldn't be hard to make it read ENV though in https://github.com/amir20/dozzle/blob/master/main.go#L36-L38.

I use pflags so if there is an easy way to make that change, I'll happily accept PRs.

from dozzle.

amir20 avatar amir20 commented on August 18, 2024

This might fix this.
#21

I'll need to update the docs. You can do DOZZLE_BASE=/test go run main.go

from dozzle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.