Adding .env to the .gitignore shared between the template and the generated project,
Moving current .env to .env.jinja and templating it accordingly, so that after generation, it's (a) full of secrets and (b) git-ignored,
Marking password questions secret: true and thereby removing them from .copier-answers.yml,
Removing the need for .copier/update_dotenv.py.
Additionally, it leverages some other features of copier, such as validator: for prompts that have string requirements (in this case, no spaces) and a default based on upstream responses to improve user experience.
Thanks for the interest @shippy! But this would make it work exclusively with Copier, and the idea is for it to just work by cloning it. So I'll pass on this one, but thanks for the effort! :coffee:
Fixes #724 by following means:
.env
to the.gitignore
shared between the template and the generated project,.env
to.env.jinja
and templating it accordingly, so that after generation, it's (a) full of secrets and (b) git-ignored,secret: true
and thereby removing them from.copier-answers.yml
,.copier/update_dotenv.py
.Additionally, it leverages some other features of copier, such as
validator:
for prompts that have string requirements (in this case, no spaces) and adefault
based on upstream responses to improve user experience.