prose-im / prose-app-web

Prose Web application. XMPP client for team messaging.
https://prose.org/downloads
Mozilla Public License 2.0
25 stars 2 forks source link

Allow deployment on different web context #113

Closed guusdk closed 5 months ago

guusdk commented 5 months ago

The application has hard-coded references to web artifacts that will only work when the application is deployed in the root context of the webserver (eg: https://www.example.org/).

I'd love to be able to deploy the app in a different web context, such as https://www.example.org/prose/). Can the references be made relative, rather than absolute?

valeriansaliou commented 5 months ago

Thanks, keeping this one open for later, we'll make the required adjustments.

valeriansaliou commented 5 months ago

You can now adjust the configuration path: context.basePath and set it to eg. /subpath/, and rebuild the Prose app (npm run build). Make sure to always include a trailing slash since this is required.

guusdk commented 5 months ago

Thanks! I hate to be difficult, but ... could this be improved in a way that doesn't require rebuilding? I'd prefer to be able to choose dynamically what the context root is.

valeriansaliou commented 5 months ago

Unfortunately no, since all base paths pointing to assets get hardcoded at build-time by Vite (and I have no control over that).

guusdk commented 5 months ago

🫤

This might be overstepping, but is there any chance that your CI/CD pipeline can generate an additional artifact that's hard-coded to use /prose/, attached to your future releases? I'd really like to avoid having to maintain a development environment just to keep up with your releases.

valeriansaliou commented 5 months ago

That's the kind of complexity I don't want to introduce here to be honest. Could you maybe fork Prose and sync it from time to time, using a modified CI pipeline on your end to issue your own releases automatically? The changes should be trivial on your end.

guusdk commented 5 months ago

That's understandable, thanks. I'll have a look to see if I can automate my way out of this somehow.