[Can't run production] Front end makes backend requests with bare IP

Issue #1 resolved
Former user created an issue

Hi!

I'm enjoying the tool and would like to run it in a productive environment. To do so, it would be ideal to have it behind a proxy with an HTTPs connection.

However, putting it behind a proxy doesn't work because the front end application makes requests using the direct IP instead of a defined domain.

Here's an example proxying from localhost:80 to localhost:8080:

proxy

Same problem occurs when running the app behind a load balancer, as the requests are built using the internal IP as base URL.

It would be cool if a domain variable was settable in docker that determined the base URL of al requests.

Also, the Docker Hub page documentation appears to be wrong/incomplete.

Option 1 says to run a stateless docker container with the following command:

docker run -it --rm -p 8080:8080 wisemapping/wisemapping:latest

But then says: "Then, open your browser at http://localhost:8888", which is the wrong port.

Option 2 says "Running HSQL with a mounted directory", but the exact same command as option is shown, no volumes are actually mounted.

This seems like a really nice tool and with the vast lack of open source alternatives, me and my friends would love to use it!

Thanks!

Comments (7)

  1. Marc QUINTON

    I am also facing this issue with a blank page when loading Wisemapping behind a reverse-proxy ; application is working fine when used directly using docker on http://localhost:8080/ ; need to inspect what’s going wrong and try to find way to make it work.

    best regards.

  2. Marc QUINTON

    here is workaround :

    generated code on header page is like this:

    <script type="text/javascript" src="${site.static.js.url}/webapp/vendors.bundle.js" crossorigin="anonymous"></script>
    <script type="text/javascript" src="${site.static.js.url}/webapp/app.bundle.js" crossorigin="anonymous"></script>
    
    need to replace src="${site.static.js.url}/webapp/app.bundle.js" with src="/static/webapp/app.bundle.js"
    

    so we can add a substitute filter in apache configuration, just after reverse proxy:

        RewriteEngine On
        ProxyPass        / <http://localhost:8922/>
        ProxyPassReverse / <http://localhost:8922/>
    
    <Location "/">
        # AddOutputFilterByType SUBSTITUTE text/html
        AddOutputFilterByType INFLATE;SUBSTITUTE;DEFLATE text/html
        Substitute "s|src=\"\$\{site.static.js.url\}|src=\"/static|"
    </Location>
    

    that’s all ; enjoy !

  3. Ovidiu

    did you add/edit:

    site.baseurl = https://mindmap.mydomain.tld
    

    inside app.properties? I followed this page: https://hub.docker.com/r/wisemapping/wisemapping

    there is an example to get the default app.properties

    curl https://bitbucket.org/wisemapping/wisemapping-open-source/raw/644b7078d790220c7844b732a83d45495f11d64e/wise-webapp/src/main/webapp/WEB-INF/app.properties

    then see my sample docker-compse.yml here https://bitbucket.org/wisemapping/wisemapping-open-source/issues/3/missing-volume-informations-for-docker on how to mount app.properties into the container

  4. Paulo Veiga

    Hey Ovidiu,

    You nailed, thanks for sharing !

    This properly is the one you need to edit to support behind proxy setup. I will improv the documentation to further details about this setup.

  5. Log in to comment