this post was submitted on 28 Feb 2024
10 points (100.0% liked)
Programming
423 readers
6 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
A few suggestions:
Having people remember all the docker, django, and poetry commands just slows things down. Maybe wrap those in a shell script, or better, in a pyinvoke tasks.py, or more even better, in a CLI using argparse or click. This way, people can install your tool using pip and create new projects, manage, and run them quickly.
If you need the user to answer a few interactive questions, questionary is pretty decent. The click library also lets you ask for input, have defaults, and also load values from environment variables.
Have lots of defaults in a central .env or config file that people can customize once the project has been created. Things like separate dev, test, prod or local and cloud settings.py files help keep things organized.
Think about ultimate deployment. Where is such a project going to get installed? As a single docker container, scalability is limited. Which cloud hosting services can you push to with one command? Add those to your pyinvoke or CLI.
When deploying to cloud, make sure security best practices are maintained. Keep SECRETS and API keys in a separate file which is also listed in your .gitignore so it doesn't get accidentally checked in.
Think about the different stages. Initial, ongoing dev, testing, first deploy, and continuing updates after that. What can you do to make the job of the dev easier?
Thanks for the detailed feedback! I made an attempt to put settings that change between environments in a separate file, I'll try switching to environment files.
Regarding secrets, I'd love to integrate with a secret management solution, or even better, turn the whole thing into some ansible stuff (which I never used but seems awesome). Do you recommend anything on this side?