build(install): improve root detection and set ownership on files #186
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #187
This PR improves installation and resolve problems when user install as root user or if the project folder has root rights
As we move to the rengine user inside docker, root install is not possible.
And files needs to be set to the sudo user installing reNgine-ng to prevent bad permissions inside the docker volumes
So I've added more check for root user and a chown with the current user on the project files
It appears like this if the install change the project folder permissions
Tested under root directly -> Install exit
Tested under sudo su -> Install exit
Tested under sudo -> Install continue and reset the project folder permission to the current user if it was not
I've also put some warning for the PG_USER part in the .env-dist file
And I've remove the useless make.bat