teableio / teable

✨ The Next Gen Airtable Alternative: No-Code Postgres
https://teable.io
Other
11.67k stars 537 forks source link

Documentation for Nginx reverse proxy setup behind a subfolder #946

Open wsdookadr opened 4 weeks ago

wsdookadr commented 4 weeks ago

Is your feature request related to a problem? Please describe. Whenever self-hosting an app like this, an ready-made Nginx configuration would be really useful. Because I like Teable but I'm not familiar with Nextjs or with all the settings Teable has, it's hard for me to know if it's possible to host Teable behind a subfolder reverse proxy on Nginx. Examples of Nginx reverse proxy subfolder setups: example1 example2.

Describe the solution you'd like An environment variable that tells the app it's running under a subfolder. A ready-made subfolder Nginx reverse proxy configuration to serve Teable from a subfolder, example: http://somedomain/teable/.

This is important to have because there's different classes of users, some end-users, some powerusers, and others who want to customize/change behavior/tweak/adding features (developers).

Describe alternatives you've considered I've tried to set PUBLIC_ORIGIN=http://192.168.1.150:3000/teable but this doesn't achieve the desired result. I'm still wondering what this environment variable is for. As a last resort it would be possible to use sub_filter in Nginx to rewrite the urls for the endpoints and all other resources used on a case-by-case basis but it's a complete hack and very tedious.

I've also tried to change basePath in next.config.js and rebuilding the Docker image but it still didn't work.

Other than that, Teable is an amazing app and I like it a lot.

Dough-su commented 2 weeks ago

I have the same issue, and I also implemented it using Nginx's sub_filter. I can upload files now, but I still can't preview images on the page.