Skip to content

Deploy a FastAPI app

Push your code to GitHub, start a new app, pick the repository and click Deploy with Drone. Or run hivepod deploy in the project folder.

Pick FastAPI. DockHive installs requirements.txt and serves your app with uvicorn.

main.py
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def index():
return {"hello": "DockHive"}
requirements.txt
fastapi
uvicorn[standard]

If your app lives somewhere else, set the Start Command, for example:

Terminal window
uvicorn myservice.api:app --host 0.0.0.0 --port $PORT

Your interactive API docs are then at https://<your-app>.dockhive.app/docs.

For other Python web frameworks, use the Python preset with a start command that listens on 0.0.0.0:$PORT.