You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Configure the Docker image to use a different path such that simwrapper can be run on a subpath #2
If I want to run simwrapper on a subpath (using e.g. nginx-proxy), it appears that's currently not possible as I don't see a way of configuring the virtual path for simwrapper using Docker environment variables.
Simwrapper uses the "Vite" build system, and in Vite you specify the root path where the site will be located in the vite.config.mjs file. We have several instances of Simwrapper running at various prefixes like https://vsp.berlin/simwrapper and others. You edit the vite.config.mjs file (and the 404.md file if hosting on Github), build the site, and the outputs expect to be in the correct place.
But, I'm not sure how to do this in a Docker image dynamically without knowing in advance what the users wants as path prefix! The existing Docker image contains a "pre-built" copy of the site and expects that it is available at the root path, as you discovered.
I can think about this a a bit; or maybe in your NGINX setup there is a way to define a RewriteRule that translates properly? It just hasn't come up before now.
Activity
billyc commentedon Sep 8, 2025
Simwrapper uses the "Vite" build system, and in Vite you specify the root path where the site will be located in the vite.config.mjs file. We have several instances of Simwrapper running at various prefixes like https://vsp.berlin/simwrapper and others. You edit the vite.config.mjs file (and the 404.md file if hosting on Github), build the site, and the outputs expect to be in the correct place.
But, I'm not sure how to do this in a Docker image dynamically without knowing in advance what the users wants as path prefix! The existing Docker image contains a "pre-built" copy of the site and expects that it is available at the root path, as you discovered.
I can think about this a a bit; or maybe in your NGINX setup there is a way to define a RewriteRule that translates properly? It just hasn't come up before now.
b-a0 commentedon Sep 8, 2025
I'm not familiar with Vite, but their docs seem to cover this situation. Additionally, it appears you can configure vite-specific environment variables, so it seems there's a path from Docker to the vite config.
I'll see if I can come up with a working setup and will report under this issue.