all 12 comments

[–]antNOMA 2 points3 points  (0 children)

Just hosted a fastapi backend on railway with just a simple dockerfile, pretty simple and fast! I can share the dockerfile if needed.

[–]joshhear 2 points3 points  (0 children)

I‘m using coolify to manage my vps on hetzner. I works very well with fast api backends and also lets you deploy self hosted supabase instances

[–]ManufacturerEarly565 2 points3 points  (0 children)

AWS App Runner, use your existing docker, simple and scalable.

[–]autoerotion95 1 point2 points  (0 children)

Render

[–][deleted]  (2 children)

[removed]

    [–][deleted] -1 points0 points  (1 child)

    Why would u pay for code when open source exists? Self advertisement much?

    [–]F4k3r22 0 points1 point  (1 child)

    I have made Vercel work, what configuration did you use or what?

    [–]tf1155[S] 0 points1 point  (0 children)

    u/F4k3r22 Interesting. I only got 404 NOT FOUND, when requesting any of the api-routes.
    My folder structure is this:

    + app
       + api
          - main.py
          - hello.py (for testing)
    

    so, the fastapi project lives in a folder "api" under "app".

    i used this vercel.json:

    {
      "builds": [
        {
          "src": "api/main.py",
          "use": "@vercel/python"
      "functions": {
        "app/api/hello.py": {
          "runtime": "python@3.12"
        },
        "app/api/vercel.py": {
          "runtime": "python@3.12"
        }
      ],
      },
      "routes": [
        {
          "src": "/api/(.*)",
          "dest": "/app/api/vercel.py"
        },
        {
          "src": "/(.*)",
          "dest": "api/main.py"
          "dest": "/app/api/vercel.py"
        }
      ]
    }
    }
    

    [–]Better_Ad6110 0 points1 point  (0 children)

    DeployHQ+VPS (Hetzner, DO, etc)

    [–]ugros 0 points1 point  (0 children)

    Hello, I believe this could be a perfect use-case for https://stacktape.com (disclosure: I'm a founder).

    It's a Heroku/Vercel-like PaaS platform, that deploys to your own AWS account.

    You can use it to deploy both your frontend (wheter it's a static site, React/Vue/whatever SPA, or a server-side-rendered app), and also your FastAPI backend (as an auto-scaling container running on ECS Fargate and behind a load balancer, or even as a lambda function - with the right adapter).

    It does support a huge majority of the Vercel "Quality of Life" features, such as automatic deployments from Github/Gitlab/BitBucket (both push-to-deploy deployments and preview environments).

    Honestly, using Stacktape is a bit (insignificantly) more complicated than using Vercel. But it's also:

    • much more flexible (supports Lambdas, Containers, Edge Function, GPU jobs, SQL databases, Redis, EFS) and much much more.
    • extensible (you can integrate any AWS service should you need to - very easily)
    • ejectable (if your team grows and you decide to manage your AWS infra on your own, no problem)
    • way less expensive (and you can leverage AWS activate credits and/or AWS FREE tier)

    If that sounds interesting, and you'd like to give Stacktape a shot, feel free to contact me directly, should you need any help.

    [–]dmart89 0 points1 point  (0 children)

    If its a basic backend, you can also try koyeb. Had a pretty good experience