Ask HN: How do you deploy an API in 2023?

1 points by leobg ↗ HN
I work with flask or fastapi. So far, I deploy to a rented bare metal server, using gunicorn and nginx. It’s a hassle, setting up the service, SSL certificate, etc.. I imagine there are better ways.

Interested in hearing how you guys do it, both for GPU and non-GPU apps. Thanks!

3 comments

[ 1497 ms ] story [ 1484 ms ] thread
Are you talking about deploying for the first time or for every release cycle? The former is done infrequently, usually once. So shouldn't be a big deal. The latter has options ranging from good old SCP to CI/CD like GitHub actions etc.

So a question for you is, what exactly are you trying to optimize? And how important is that? (Unless this is just a learning opportunity)

It's only a hassle if its not automated. Look into Terraform, Ansible, Saltstack etc and spend some time writing infrastructure-as-code to automate the provisioning and management of all this stuff.
Just use Heroku until you can afford to hire a real SRE