Skip to content

Configure the Docker image to use a different path such that simwrapper can be run on a subpath #2

Open

Description

@b-a0

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.

This means that when using Docker I can only run simwrapper on a root URL (e.g. www.example.com) without further path components (e.g. www.example.com/myresults/simwrap/)

Is this perhaps configurable through other means?

Activity

  1. billyc commented on Sep 8, 2025

    @billyc
    Contributor

    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.

  2. b-a0 commented on Sep 8, 2025

    @b-a0
    Author

    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.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions