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 the ability to create an admin user from environment variables #277

Open
MatteoGauthier opened this issue Aug 6, 2023 · 1 comment

Comments

@MatteoGauthier
Copy link

Hey ! Hope you're doing well, I wanted to know if it's possible to include admin default admin credentials. Especially with environment variables like ADMIN_EMAIL=<email> and ADMIN_PASSWORD=<secret>. Why with environment variables? Because in some cases, users might need to deploy shynet on a docker instance without having shell access. Environment variables are common knowledge and does not require knowing Django Admin.

What do you think of this approach? And do you have any ideas on how to integrate it into shynet (as a workaround to avoid having to use the instance shell) ? I'm thinking of adding this administrator login at startup.

Thank you for your time and this quality project. Have a nice day!

@milesmcc
Copy link
Owner

milesmcc commented Aug 9, 2023

Hi @MatteoGauthier! This is certainly something we could consider. I'm hesitant to add default credentials (as in admin username and password password, for example), but I do think it would be OK to check whether certain environment variables are set at startup and create an admin user with those credentials if none already exists. Would someone be willing to open a PR with this change?

@milesmcc milesmcc changed the title Question : Default Admin credentials Add the ability to create an admin user from environment variables Aug 9, 2023
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

No branches or pull requests

2 participants