stonith404 / pingvin-share

A self-hosted file sharing platform that combines lightness and beauty, perfect for seamless and efficient file sharing.
https://stonith404.github.io/pingvin-share/
BSD 2-Clause "Simplified" License
3.3k stars 236 forks source link

🚀 Feature: Change environment variables to make them unique #397

Closed RatCornu closed 3 weeks ago

RatCornu commented 9 months ago

🔖 Feature description

Basically for the backend to change the variable PORT to BE_PORT (or something like this), DATABASE_URL to BE_DATABASE_URL and so on, and similarly for the frontend environment variables.

🎤 Pitch

This would avoid variable conflicts (like PORT which is used by the frontend and the backend for different purposes).

I am currently packaging pingvin-share for NixOS and it will be much easier with this feature ^^.

stonith404 commented 9 months ago

Great, the packaging for NixOS sound interesting :)

Yeah, it's not ideal that the frontend and backend have the same environment variable. Do you think it is enough if I just add BACKEND_PORT and FRONTEND_PORT because other environment variables like DATABASE_URL are unique?

RatCornu commented 9 months ago

Yes I think that should be enough, I did not look into details at the code, do whatever you find the most suited ^^. And I will keep you inform of the packaging process (which can take quite some time)!

RatCornu commented 9 months ago

I continued a little the packaging process and it appeared that this feature is not required for me to finalize the package, but I think it can still be a good idea to rename those variables.

bauermarkus commented 1 month ago

Hello Is there any update in this?

I am in conflict with other docker containers behind a reverse proxy as I can't really change the port and the function is not working because of this...

Maypul commented 3 weeks ago

Also looking for this update

stonith404 commented 3 weeks ago

In version 1.2.0 the backend port env variable is now called BACKEND_PORT and the frontend port env variable PORT.

I know it is confusing that the frontend port is only called PORT, but there is no way at the moment to rename the environment variable because of NextJS.

bauermarkus commented 3 weeks ago

So the documentation is not updated?

image

stonith404 commented 3 weeks ago

They should be now.