Framework guide

Deploy a Python app from GitHub

Deploy FastAPI, Flask, Django, or another Python web app from source on Shiprr with explicit dependency install, start commands, env vars, logs, health checks, and rollback.

Before you start

  • Your app should be in a GitHub or GitLab repository.
  • Commit requirements.txt, pyproject.toml, or the dependency file your project uses.
  • Your server must listen on the PORT environment variable Shiprr provides.
  • Add a lightweight health endpoint such as /health.

FastAPI settings

For a FastAPI app with an ASGI object named app in main.py, use these settings under App → Settings → Build & Runtime.

root directory: ./
install command: pip install -r requirements.txt
build command:
start command: python -m uvicorn main:app --host 0.0.0.0 --port $PORT
health check path: /health

Make sure uvicorn and your framework are listed in requirements.txt.

Flask settings

For Flask, use a production server such as gunicorn.

root directory: ./
install command: pip install -r requirements.txt
build command:
start command: python -m gunicorn app:app --bind 0.0.0.0:$PORT
health check path: /health

Replace app:app with the module and Flask app object your project uses.

Add a health endpoint

Health checks should be fast and should not require login. A minimal FastAPI health endpoint looks like this:

from fastapi import FastAPI

app = FastAPI()

@app.get("/health")
def health():
    return {"ok": True}

If the app is healthy but deploy status does not become healthy, check the start command, port binding, required env vars, CPU, and RAM.

Environment variables

Add production values under App → Settings → Environment variables. Saving env vars redeploys the app so new values apply to live replicas.

DATABASE_URL=postgres://...
REDIS_URL=redis://...
SECRET_KEY=change-me
PYTHONUNBUFFERED=1

Keep secrets out of Git and avoid printing secret values in logs.

Deploy

  1. Open the dashboard and choose Apps → New app.
  2. Connect GitHub or GitLab if needed.
  3. Select the repository, branch, region, root directory, and deploy trigger.
  4. Confirm install, build, start command, health check path, and env vars.
  5. Create and deploy the app.

New apps start with 1,000 MHz CPU and 512 MB RAM per replica. Increase CPU, RAM, or replicas if the app needs more capacity.

Verify and debug

  • Use build logs if dependency install or compile steps fail.
  • Use runtime logs if the app starts and then crashes.
  • Check missing env vars when database, cache, or API connections fail.

After the default Shiprr hostname works, attach a custom domain from the app's Domains page. Shiprr provisions HTTPS automatically after DNS points to the Shiprr target.

Rollback

If a release breaks the app, roll back from deployment/build history. Shiprr reuses the selected previous successful build, skips a source rebuild, and creates a fresh deployment attempt with current runtime settings.

Deploy your Python app on Shiprr

New accounts include welcome credit, enough to try a small app before paying.

Create account