-
-
Notifications
You must be signed in to change notification settings - Fork 77
Allow defining PORT and LISTEN_IP environment variables #346
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
base: unstable
Are you sure you want to change the base?
Conversation
Update create_database.js
Update server.js
|
Didn't realize the |
|
Hey @botagas , just completed testing on this change and realized that when the port is changed. In the compiled build of the ui, the backend is unreachable due to the proxy mapping being baked in during the docker image compilation. This is defined in |
I will look into this a bit more after I am more inline with finishing my master's thesis, deadlines are catching up to me. I will try my best to revisit this again. I looked into what you mentioned a few days ago and I think I had an idea or two but didn't have enough time to tinker with it. EDIT: I will be revisiting this after a week or so, at the start of the next month. |
What needs to be done
PORTandLISTEN_IPin environment variables for later useprocess.env.<var>to grabPORTandLISTEN_IPvars from.envWhat has been done
PORTandLISTEN_IPin.env.examplefileprocess.env.PORTandprocess.env.LISTEN_IPinstead of hardcoded values. If the variables are not set, we use defaults.Greatly helps with automation situations on bare metal, since otherwise you need to edit the file manually (or automate the manual editing process) in order to have the service listen on a different port/ip. An option is to use a reverse proxy to work around it, but that doesn't solve the main concern here.
Please do verify changes, I am no professional in terms of coding and programming, I just package apps and edit code from time to time.
Suggestions for further improvement that I would like to implement
await client.query(`CREATE DATABASE ' \\+ _POSTGRES_DATABASE`);, we could use something likeSELECT 'CREATE DATABASE <db>' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = '<db>'). This is just an idea if anyone proceeds with this..envfile, you have to proceed with the followingcurlrequests to hack the process: