mirror of
https://github.com/getAlby/hub.git
synced 2026-08-16 13:01:16 +02:00
* feat: add base path to front end - add docker build arg to set base path frontend is served under - set vite.config.ts base value based on docker build arg - update http variant request function to inject base path during calls to /api and /images - update how static assets are loaded from public folder to inject base path during vite build To use a base path build the docker image with --build-arg BASE_PATH=/hub/. All assets and api calls from the frontend will use that base path as prefix. The backend service is not using the base path, when using a proxy the base path has to be stripped. * chore: simplify base path usage and add extra documentation * chore: add extra documentation --------- Co-authored-by: 8de2fdb0 <89734465+8de2fdb0@users.noreply.github.com>
17 lines
486 B
Markdown
17 lines
486 B
Markdown
# Caddy Subpath
|
|
|
|
This is an example of how to run Alby Hub on a subpath using Caddy
|
|
|
|
To test locally edit `sudo nano /etc/hosts` and add `127.0.0.1 your-domain.com`
|
|
|
|
Use the following environment variables when building the frontend:
|
|
|
|
```bash
|
|
BASE_PATH="/example-path" yarn build:http
|
|
```
|
|
|
|
Then run Alby Hub as normal. (if default port is not 8080 you will need to update the Caddyfile)
|
|
|
|
Then start caddy: `sudo caddy run -c ./Caddyfile`
|
|
|
|
and visit `http://your-domain.com/example-path
|