Skip to content

Conversation

@TAT-Hins
Copy link

Hi,

I notice that when I deployed the self-hosting environment in Docker, I tried to modify $PG_USER variable to make it different from the default value for security but it didn't work. I checked the setup.sh that the migrate image used, and found this bug that $PG_USER seems to be an obsolete variable, only having a definition but never being used in the script.

I added the assignment with an exception detection (should never catch that, since there are pre-defined default values in the .env.example file (here) for variable $PG_USER and $PG_PASSWORD, moved them forward before where they are used, and modify the CREATE USER SQL query from default value app_user to $PG_USER in order to make it work.

This is my first time opening a pull request ever in GitHub, so please let me know if there are any problems with the code or if there is anything I should do to follow the rules and merge this commit. Thank you!

Best,
Jinxuan (Hins) Fang

* Fixed usage of variable $PG_USER and $PG_PASSWORD that can be modified in the self-hosting environment, like .env file in Docker, while retaining the default set value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant