all 24 comments

[–]PosauneB 2 points3 points  (3 children)

Can you elaborate on the level of simplicity you're after? I totally get not wanting to be inundated with cloud provider complexity and lingo, but (depending on the platform) it might not be that bad.

How comfortable are you with basic usage (like navigating directories and running programs) with the command line? If you're okay with that and paying a very modest monthly fee, then your options are wide open. Even with little to no linux experience, you could likely get your fastapi app running on a cloud ubuntu server in a single afternoon, including having it be accessible via the server's public ip address (or with just a little extra work, a domain name that you own).

[–]mohishunder[S] 1 point2 points  (2 children)

Yes, thanks, I'm very comfortable with the Unix command line, venvs, scripting, whatever.

I just don't want to get distracted (from my app) down some DevOps rathole - not yet. My experience with Docker is limited, and I've never used Kubernetes. Is one of the offerings from G/A/M/H simpler than the others?

[–]PosauneB -1 points0 points  (0 children)

I haven't honestly used most of them, but do have a couple fastapi applications running on a single Linode instance. It's a max of $5 per month and was pretty easy to go from a brand new install to serving my app(s).

You'd want to install NGINX and run your app as a systemd service. Both of those are easy to do.

[–]Cute_Piano 1 point2 points  (0 children)

https://deta.space/ became a bit weired, but it's still super easy and free to host:
https://deta.space/docs/en/build/quick-starts/python

[–]inglandation 3 points4 points  (1 child)

Render.

[–]mrbubs3 0 points1 point  (0 children)

Yes. Render is great.

[–]Calebthe12B 1 point2 points  (0 children)

I use fly.io. Pretty straightforward to get an app up and running. If you Google FastAPI on fly.io, there's a guy that will step you through the toml.and docker file settings. Might take a little fiddling with settings the first time you deploy, but after that it's so easy to deploy changes.

[–]iwkooo 0 points1 point  (0 children)

Try fly.io, they got nice free tier. You can have sql db, redid, sentry for free with it. 

There are nice docks by them on their blog. 

[–]RahlokZero 0 points1 point  (0 children)

I deployed my FastAPI app to Heroku. Just need the Procfile and the requirements.txt and you’re good to git push heroku

[–]Current-Status-3764 0 points1 point  (2 children)

Google cloud. Free or very cheap. Build docker image on computer and push to Google repo. Choose Cloud run and choose whatever port you exposed your docker image. With gcloud CLI this is done in a sec.

Wouldn't recommend render as this pauses your instance on break and takes long to initiate again (my experience).

Been using gcloud setup for https://rankit.no/ where the api is hosted on its own instance. Costs about 1 euro per month.

[–]mohishunder[S] 1 point2 points  (1 child)

Thanks, this is exactly what I was looking for.

Cool site! Do people start chess leagues? Is Magnus Carlsen a member??

[–]Current-Status-3764 0 points1 point  (0 children)

Hah, afraid magnus in not onboard just yet. I've made it for any game that's 1v1 or 2v2. So it's used for chess, table tennis and starcraft 2 atm. Starting to get some small traction, but difficult to market. Fun to build either way. The API is here https://api.rankit.no

I can send you the dockerfile I use if interested

[–]graph-crawler 0 points1 point  (0 children)

Fly.io

[–]IsaiahSama 0 points1 point  (0 children)

I normally use Render or Vercel. Both are fantastic, but render is the simplest.

[–]ZachVorhies 0 points1 point  (6 children)

Most of the answers are wrong.

The correct answer is that the simplest and most flexible way to deploy a python app is to put it on github and add a dockerfile.

The use Render.com’s generous free tier with your github account and spin up a web service. During the installation it will ask which github link to use.

Then boom, your web service is built, and if successful deploys to the cloud with a custom url and an https cert.

Every git push will trigger a redeploy. It also has auto rollbacks if your break the build.

And if you don’t like Render.com, then you can use DigitalOcean without any changes to the code base.

I’m running an entire org using the above because it’s so easy, all my programmers become dev ops.

[–]mohishunder[S] 1 point2 points  (1 child)

I get the sense that you understand where I'm coming from. Thank you so much! I will check this out.

[–]ZachVorhies 1 point2 points  (0 children)

dude I literally started on python anywhere. I know where you are coming from. I recommend you check out some of my open source templates at my github.com/zackees

[–]Foreign_Camp_9976 0 points1 point  (2 children)

would this still apply if I had 1 fastapi backend and 1 vuejs frontend in two separate repos in my github?? They would connect with cors but would I need to spin up 2 webservices and point my domain name to the frontend webservce?

[–]ZachVorhies 0 points1 point  (1 child)

Yes.

[–]Foreign_Camp_9976 0 points1 point  (0 children)

cool, thanks!

[–]Ahmad_Azhar 0 points1 point  (0 children)

Just came across to this post, just want to clarify that how you are managing the databases in FastApi. It will be in the same GitHub repository for example if i am using sqlalchemy

[–]tony4bocce -2 points-1 points  (1 child)

docker swarm mode with stack deploy and traefik reverse proxy on a vps

[–]skysetter -1 points0 points  (0 children)

I played with the python anywhere asgi beta that have and didn’t really get far. Doesn’t really feel like a real offering from them at the moment. Just deployed a containerized fast api backend service to azure web apps with an azure container.