From 2efc1b5a879d544656e4fcb9261e0b7ef5d9e4cd Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 23 Sep 2022 12:23:59 +0200 Subject: [PATCH] feat(docs): add docs about how to deploy Vikunja in a subdirectory --- docs/content/doc/setup/subdirectory.md | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 docs/content/doc/setup/subdirectory.md diff --git a/docs/content/doc/setup/subdirectory.md b/docs/content/doc/setup/subdirectory.md new file mode 100644 index 00000000..ef438c69 --- /dev/null +++ b/docs/content/doc/setup/subdirectory.md @@ -0,0 +1,39 @@ +--- +title: "Running Vikunja in a subdirectory" +date: 2022-09-23T12:15:04+02:00 +draft: false +menu: + sidebar: + parent: "setup" +--- + +# Running Vikunja in a subdirectory + +Running Vikunja in a subdirectory is not supported out of the box. +However, you can still run it in a subdirectory but need to build the frontend yourself. + +## Frontend + +First, make sure you're able to build the frontend from source. +Check [the guide about building from source]({{< ref "build-from-source.md">}}#frontend) about that. + +Then, run + +``` +pnpm vite build --base=/SUBPATH +pnpm workbox copyLibraries dist/ +``` + +Where `SUBPATH` is the subdirectory you want to run Vikunja on. + +Once you have the build files you can deploy them as usual. +Note that when deploying in docker you'll need to put the files in a web container yourself, you +can't use the `Dockerfile` in the repo without modifications. + +## API + +If you're not using a reverse proxy you're good to go. +Simply configure the api url in the frontend as you normally would. + +If you're using a reverse proxy you'll need to adjust the paths so that the api is available at `/SUBPATH/api/v1`. +You can check if everything is working correctly by opening `/SUBPATH/api/v1/info` in a browser.