GithubHelp home page GithubHelp logo

Comments (15)

daledavies avatar daledavies commented on August 25, 2024 3

I found the problem and fixed it! I've packaged everything into the latest release (v1.2.3), you should be able to pick this up from Docker Hub now using the v.1.2.3 or latest tags.

Thanks again :)

from jump.

gotschi avatar gotschi commented on August 25, 2024 1

That is usually the case, that apps get proxied per subdomain.
In which case this is not needed.

(I'm also using a wildcard cert which exposes all eventual other subdomains,
so I like to keep that at 1 domain because it's easier to surveil attacks etc..)

anyways, great landing page I really like the simplicity!

EDIT: I just removed all absolute references "/" in templates, classes/Background.php
and it seems to work fine except for the tag referncing which i can redirect at the proxy level

from jump.

gotschi avatar gotschi commented on August 25, 2024 1

so I used following docker-compose and mapped the repo to /var/www/html

        volumes:
            - ./jump/jumpapp:/var/www/html
            - ./backgrounds:/backgrounds
            - ./search:/search
            - ./sites:/sites
        environment:
            SITENAME: '#home'
            OWMAPIKEY: 'redacted'
            LATLONG: 'xxx.xxxxx,xxx.xxxxx'
            NOINDEX: 'true'
            SHOWGREETING: 'false'
            WWWURL: '/jump'
            CACHEBYPASS: 'true'

and I can't get it to work, even with /jump manually put in config - background and weaterdata.php fail to load (because the js is not compiled?)

anyway I also tried building the container but have no display on my machine :/
error: failed to solve: failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: exit status 1, out: Cannot autolaunch D-Bus without X11 $DISPLAY``

I never did multiarch builds before

so I'm not much of a help here,
In case for apache however it's a simple vhost < Location > entry to get such pages on a custom slug, I guess nginx is even easier:

	<Location /jump>
		ProxyPass http://127.0.0.1:9090/
		ProxyPassReverse http://127.0.0.1:9090/
        </Location>

from jump.

daledavies avatar daledavies commented on August 25, 2024 1

So close, must admit I didn't test the tag pages yet!

I'll take a look tomorrow. It'll be something simple, at least now I have a way of testing it.

Thanks again for your help 😀

from jump.

daledavies avatar daledavies commented on August 25, 2024

Interesting, thanks for letting me know. I'll see if I can recreate your reverse proxy scenario (as I currently use subdomains rather than directories) and think about ways to address this. Possibly an optional subdirectory or wwwroot config option.

from jump.

daledavies avatar daledavies commented on August 25, 2024

Yeah that's the reason I went with the absolute URLs in the templates. I'm thinking a wwwroot option might be the best way forward, then I can prefix URLs with that in the templates.

from jump.

daledavies avatar daledavies commented on August 25, 2024

I've added an option for this in v1.2.2 (released today). You can now configure a custom URL via the WWWURL environment variable (if using Docker) or the wwwurl parameter in config.php.

Thank you again for reaching out :)

from jump.

gotschi avatar gotschi commented on August 25, 2024

awesome, thank you!

however, i tried to pull :latest from docker-hub and also :v1.2.2 but it seems I cant get the current one - maybe the CDNs need some time.

anyways thank you for taking care of it!!

from jump.

gotschi avatar gotschi commented on August 25, 2024

Seems like the wwwroot parameter is still missing in L40 classes/Background.php
and also in the static compiled JS assets/js/src/classes/Weather.js

and they also don't get used with docker environments, had to rewrite config.php

from jump.

daledavies avatar daledavies commented on August 25, 2024

Thanks for sticking around and coming back to test this, really appreciated! Unfortunately I'm not able to recreate your setup locally so wasn't able to test properly myself.

I have fixed Background.php and Weather.js, plus corrected the docker environment variable issue.

Are you able to pull the main branch and test that , would save a bit of time, or do you need me to make a docker image?

from jump.

daledavies avatar daledavies commented on August 25, 2024

I'd intended that you should put the full URL including domain (e.g. https://yourdomain.com/start), but will need to do some testing with an actual proxy in place to understand why what you have got isn't working as I think it should.

The compiled javascript bundle should be in place already as I bundled it before committing.

Check that the web root directory hasn't been overwritten when you started the container, maybe stop the container and add the DEVELOPMENT: 'true' environment variable to docker-compose, then pull the main branch again before bringing the container back up. The development variable isn't documented, but it stops the container entrypoint moving things around on startup.

from jump.

daledavies avatar daledavies commented on August 25, 2024

I'll have a play around over the next few days anyway and see if I can work out why it isn't working for you 😀

from jump.

daledavies avatar daledavies commented on August 25, 2024

I set up two tests using the latest commit from main and both do seem to work as expected.

The first was to copy everything from within the jumpapp directory into jumpapp/test and then set WWWURL to /test.

The second was to use an nginx reverse proxy with the following nginx config and WWWURL set to /test...

server {

	listen 80;

	location /test/ {

		proxy_pass         http://web:8080/;
		proxy_redirect     off;
		proxy_set_header   Host $host;
		proxy_set_header   X-Real-IP $remote_addr;
		proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header   X-Forwarded-Host $server_name;
	}
}

I've pushed a new image to docker hub for you to test the latest commit... daledavies/jump:wwwurl-fix.

Let me know how you get on, thanks again :)

from jump.

daledavies avatar daledavies commented on August 25, 2024

If this works I'll create a new release with the patch and update the documentation to clarify use of the WWWURL option.

from jump.

gotschi avatar gotschi commented on August 25, 2024

yup, the :wwwurl-fix tag works fine! very nice!

I have found the DEVELOPMENT: 'true' environment var makes nginx fail, maybe there is something more to set up but running it without works as intended!

Feature successfully added!

Edit: the Tags need some refinements too it seems, the /wwwurl/tag pages come without styles.
But for me that is plenty enough I don't use the tags :)

from jump.

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.