Skip to content
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

Add way to set root password by environnement. #1814

Merged
merged 1 commit into from
May 16, 2019
Merged

Add way to set root password by environnement. #1814

merged 1 commit into from
May 16, 2019

Conversation

darnuria
Copy link
Contributor

@darnuria darnuria commented May 14, 2019

Add a condition test to pass by environement a predetermined
root password for setting up.

Related work in documentation: https://framagit.org/framasoft/peertube/documentation/merge_requests/16

@ldidry
Copy link
Collaborator

ldidry commented May 15, 2019

Maybe you could name your env var differently to make its use more obvious, like PT_ROOT_PASSWORD? Otherwise, admins may not know if it’s DB password[1] or root account password.

[1] yeah, I know, it’s dumb because that password is in config file but still, it’s better to have obvious env var.

Copy link
Collaborator

@rigelk rigelk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the right place to go 👍

much like what @ldidry said, I would rename the environment variable to something even more explicity. PT_INITIAL_ROOT_PASSWORD seems fitting, because:

  • we make explicit the scope (PT and not Postgres)
  • we make explicit this only applies at the initialization
  • we make explicit the user name

@rigelk
Copy link
Collaborator

rigelk commented May 15, 2019

@darnuria
Copy link
Contributor Author

darnuria commented May 15, 2019

@ALL: Thanks for your review! ☺

@ldidry I will make a change, PASSWORD was a "placeholder" name, is really better PT_INITIAL_ROOT_PASSWORD.

@rigelk : Thanks for the pointers to the documentation.

Is it a good idea to let run password validation on this?

Note: The validation is about pasword length https://github.com/Chocobozzz/PeerTube/blob/develop/server/helpers/custom-validators/users.ts#L10

@darnuria darnuria changed the title [🔨wip] Add way to set root password by environnement. Add way to set root password by environnement. May 15, 2019
support/doc/production.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@rigelk rigelk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from a typo, LGTM.

@darnuria
Copy link
Contributor Author

darnuria commented May 15, 2019

update:

  • Fixed some typo.
  • Fixed style, removing useless semicolon

Add a condition test to pass by environment a predetermined
root password for setting up.
@Chocobozzz
Copy link
Owner

Thanks @darnuria

@Chocobozzz Chocobozzz merged commit 3daaa19 into Chocobozzz:develop May 16, 2019
@darnuria darnuria deleted the fix/issues/189 branch April 5, 2021 18:39
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.

4 participants