-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subdirectory deployment #1092
base: master
Are you sure you want to change the base?
Subdirectory deployment #1092
Conversation
configurable using BASE_PATH env variable
change icon paths to relative
remove unnecessary regex escape
Co-authored-by: Adam Stachowicz <saibamenppl@gmail.com>
@louislam can you please help me with the implementation details? I have a few questions in TODO in the first comment. |
I have merged this PR in my fork and experienced a strange behaviour. When pressing the Edit Button on an already existing Notification it redirects me to the Status page. I wanted to open a Issue to Kuma directly when it occurred to me that I have this probably "not fully tested" PR in my fork. Maybe @trogper can you check if this happens on your site too? |
This comment was marked as off-topic.
This comment was marked as off-topic.
This is helpful, but It seems that this Pull Request in its current state is not compatible with current master as your Dockerfile describes. |
Yes, the are minor conflicts. I'll solve them when I get some time for it |
@ckocyigit That is true. At the time I posted there were no conflicts. If you need it immediately I do have an older version on dockerhub you can use in the interim: https://hub.docker.com/r/zacharlie/dbstack-monitor |
@trogper just a heads up I also tested and noticed the issue described above with notification editing when merging this |
Thanks, I know about the issue already |
This comment was marked as resolved.
This comment was marked as resolved.
replaced <a> with <router-link>, replaced 'location.href =' navigation by router.push()
Question to @CommanderStorm or @louislam: could we run a I'm checking on my side, and it seems I only need to change a few files (including the times I change Here is my WIP branch about how we could use Vite base: https://github.com/Ionys320/uptime-kuma/tree/feat/subpath. Matching commit: Ionys320@8ccbbee |
Cannot, unless the docker image includes all dev dependencies / build tools which probably is more complicated and I don't want to. |
Description
This adds support for Kuma deployment in http path subfolder. I have added two environment variables,
UPTIME_KUMA_BASE_PATH
andBASE_PATH
. The value should start and end with/
, but there is sanitization, which will add them.I have changed relevant paths in vue and html from absolute to relative and added html base tag, which is used byt the browser to build absolute paths from relative. Then I made express mount the former root to the specified
BASE_PATH
. Additionally I have fixed a few<a>
tags in vue to proper<router-link>
Socket.io does not support base tag by itself (it builds the connection url manually), so we have to prepend the basePath manually.
Fixes #147
TODO
There are a few things I would like someone to help me with:
basePath
calculation/variable? Currently it is inuptime-kuma/src/mixins/socket.js
Lines 116 to 120 in 812b4ad
uptime-kuma/src/components/settings/General.vue
Lines 268 to 271 in 812b4ad
Type of change
Checklist