TestDriven.io publishes tutorials on Python web development, covering Django, Flask, FastAPI, Docker, and frontend frameworks like Vue and React.
HN commenters link it as a tutorial source for Flask with Vue and for deploying Django with Docker, Postgres, and Nginx.
I use GitHub actions to automate test / build / deploy of django / Postgres / nginx docker orchestrations.
I prefer digital ocean for VPS and have found you can get pretty far on the smaller droplets.
I’ll typically have two environments, one getting auto deploys from anything on a feature branch, and production which gets deployed when there are changes to main.
For my setup, I initially learned using blog entries from the folks who blog at:
https://testdriven.io/blog/
I blended multiple entries to achieve just the setup I wanted.
I haven’t gone up to terraform though, finding it sufficient to use a pre built image of ubuntu / docker at the initialization.
My oldest projects still use .sh to handle deploys but I’d never go back to that stuff.
Yep. You should also be hosting and deploying from wheels[0], even for stuff you create internally. If you're doing it right, you'll end up hosting your own internal PyPi server[1], which, luckily, isn't hard[2].
We did this at one of my previous companies, and, of all the things that ever went wrong with our deploy processes, our internal PyPi server was literally never the culprit.
---
[0]: https://pythonwheels.com/
[1]: https://github.com/testdrivenio/private-pypi
[2]: https://testdriven.io/blog/private-pypi/
I think the last missing piece is getting reproducible builds which I think you can get from buildpacks [0], NixOS [1], or Bazel [2] running in your CodeBuild.
[0]: https://buildpacks.io/docs/features/reproducibility/
[1]: https://nixos.org/
[2]: https://testdriven.io/blog/bazel-builds/
AWS Lambda would be good for this.
Example: https://realpython.github.io/aws-lambda-code-execute/
Blog Post: https://realpython.com/blog/python/code-evaluation-with-aws-lambda-and-api-gateway/
Larger tutorial: https://testdriven.io/
Pythons' Flask + Vue
https://testdriven.io/blog/developing-a-single-page-app-with-flask-and-vuejs/