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

Missing .env in manual installation #288

Open
RignonNoel opened this issue Feb 28, 2021 · 2 comments
Open

Missing .env in manual installation #288

RignonNoel opened this issue Feb 28, 2021 · 2 comments
Assignees

Comments

@RignonNoel
Copy link
Contributor

RignonNoel commented Feb 28, 2021

Describe the bug
When we follow the manual installation process it seems that we are missing a .env file with some default key to launch the database migration or the run server.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the project
  2. Follow the manual installation
  3. You should have the error when trying to run the migration of the database

Expected behavior
I think we need two think to be clear and maintanable:

  1. Create a .env.example with the default ENV key we need
## GENERAL SETTINGS
DEBUG=True
SECRET_KEY=local
ALLOWED_HOSTS=127.0.0.1, localhost, 0.0.0.0
  1. Update the manual installation documentation to ask people to copy-paste the .env.example and rename it .env.

Additional context
This problem is only for manual installation process and it's not related to the use of virtualenv.

@RignonNoel RignonNoel added the bug label Feb 28, 2021
@FrankRough
Copy link

I was thinking to leave the file .env with the config already in the project so no further documentation will be needed and no action required by the user.
My question is the .env file could clash with the .env.docker? if not I think it would be a good idea just to leave it available. What do you think?

Daniel

@RignonNoel
Copy link
Contributor Author

RignonNoel commented Mar 1, 2021

Hi @FrankRough !

The .env would not be a conflict with the .env.docker since .env.docker is not a default file in UNIX or WIN system and that it's clearly define in the docker-compose.yml.

However if we go with your solution how will we manage to modify the .env without pushing it by inadvertence ? Most of the time i like to put the .env in the .gitignore (as it's done by default in the .gitignore from Github for Python) so people do not push all their secret credentials if they forgot to not track the .env in their commit.

It's why i always create a .env.example:

  • It's easy to change the default value to help newcomers (we just need to update the file)
  • It easily protect the developers from sharing their secret credentials (since it's in the .gitignore)

But I'm always open to good idea to enhance that if you have a good tips 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants