pingvin-share icon indicating copy to clipboard operation
pingvin-share copied to clipboard

🚀 Feature: Change environment variables to make them unique

Open RatCornu opened this issue 1 year ago • 4 comments

🔖 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 ^^.

RatCornu avatar Feb 01 '24 12:02 RatCornu

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?

stonith404 avatar Feb 02 '24 21:02 stonith404

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 avatar Feb 02 '24 22:02 RatCornu

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.

RatCornu avatar Feb 05 '24 14:02 RatCornu

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...

bauermarkus avatar Sep 30 '24 19:09 bauermarkus

Also looking for this update

Maypul avatar Oct 14 '24 12:10 Maypul

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.

stonith404 avatar Oct 14 '24 16:10 stonith404

So the documentation is not updated?

image

bauermarkus avatar Oct 15 '24 11:10 bauermarkus

They should be now.

stonith404 avatar Oct 15 '24 12:10 stonith404