themepark-dev / theme.park

A collection of themes/skins for 50 selfhosted apps!
https://theme-park.dev
MIT License
2.44k stars 799 forks source link

[Docker] Suggestion: support base path for selfhosting #352

Closed sambartik closed 2 years ago

sambartik commented 2 years ago

Hello, I think it would be really handy to support base path so that the css can be accessed behind reverse proxy with url: xxx.xxx.xxx.xxx/themepark.

GilbN commented 2 years ago

please test -e TP_URLBASE on the develop tag

sambartik commented 2 years ago

Thanks, great work! Seems to be okay. However it is not yet implemented in docker mods for me and putting xxx.xxx.xxx.xxx/themepark url in TP_DOMAIN env variable resulted in sed errors.

GilbN commented 2 years ago

use TP_DOMAIN=domain.com\/themepark

sambartik commented 2 years ago

Great, it works! Thanks!

sambartik commented 2 years ago

I have just noticed that when accessing the base theme css files via web, they have an @import statements with url that has http scheme despite having TP_SCHEME=https env variable set up. When I cat the css file, those same urls had https scheme, but they were missing the base path.

So: when acessing

GilbN commented 2 years ago

make sure you reverse proxy the https port or access locally using the https port

sambartik commented 2 years ago

Yup, I was connecting to theme-park via http from the reverse proxy point of view. Nonetheless, it seems kind of strange. I would think that the scheme depended entirely on what I set in the env variable. Is this the intended behaviour?