rafsaf / minimal-fastapi-postgres-template

minimal-fastapi-postgres-template based on official template but rewritten
https://minimal-fastapi-postgres-template.rafsaf.pl
MIT License
447 stars 59 forks source link

Where to deploy? #40

Open denny64 opened 8 months ago

denny64 commented 8 months ago

Hi - Where should I deploy this? Where is your example project being deployed? Are there any instructions?

Thanks

rafsaf commented 8 months ago

Hi!! You can deploy it where you want, how you want and with changes you want. There is docker image, natural choices would be docker itself (often with docker compose or a bit forgotten but still existing swarm mode) or kubernetes. Also many clouds or other companies or open source projects have their own solutions. You can even use this code without docker image at all and deploy on host level with for example systemd or supervisord or anything.

There are virtually hundreds possible deploy strategies, this project does not offer any particular "blessed" solution as I think it does not exist and is highly subjective, everybody does it differently.

As of question about https://minimal-fastapi-postgres-template.rafsaf.pl/ This site is hosted in my own homelab kubernetes inside of two-node proxmox cluster (https://www.proxmox.com/en/), if you are interested in more details then it's k3s (https://k3s.io - very nice kubernetes distro), with 3 k3s nodes in VMs, with another VM with https://www.haproxy.org/ that serves as a proxy for cluster and resolves TLS, all of the stuff managed using terraform and ansible. Not to mention that domain rafsaf.pl is the one that I bought some years ago and I also have public IP address from my ISP. The overall complexity of this setup is quite big I would say and I would recommend some popular cloud provider small VM for a start (maybe even for free). I am not going to point to particular one since I have no interest to support any of them, though I used probably most of them and for playground project choose whichever you want.