Skip to content

local vs deployed - issue with base URL #611

Open
@elx42

Description

@elx42

Hi,
Thank you very much for this wonderful project.

I was playing around with mesop in the last days and locally everything I did worked flawlessly. Now, I wanted to deploy my application on our clusters and do face an issue with paths.
On my local machine, I can access the application via

http://localhost:9000/<page_path>

On our cluster, the deployment is accessible via
https://<CLUSTERNAME>/webapps/mesop/testing/<page_path>

In the latter case, I can see 404 issues in the console, as files can not be accessed on https://<CLUSTERNAME>/.

We tried to hack this by applying a fix in our Dockerfile
RUN sed -i 's|<base href="/".*/>|<base href="/webapps/mesop/testing/" />|' /opt/conda/lib/python3.11/site-packages/mesop/web/src/app/prod/web_package/index.html

Which solved some of the issues, but other requests also refer to the base URL and subsequently fail.

Does mesop support environment-specific configuration files that I could provide to set the base URL dynamically based on the environment the application is running? Or is there a different way I could solve this issue?

Many thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions