LanguageGB
App Deployment

Deploy a Python app (FastAPI / Flask)

Python apps run inside an isolated virtualenv. The platform installs requirements and starts your ASGI or WSGI server.

What this means

What this means

Python apps on the platform run FastAPI (ASGI via uvicorn) or Flask (WSGI via gunicorn). The platform creates a Python virtual environment, installs dependencies from requirements.txt, and starts your app with the command you provide. Your entry file must be app.py or main.py in the repository root. No database is provisioned automatically.

Before you start

Before you start

Your repository must contain app.py or main.py at the root, and a requirements.txt listing all dependencies including uvicorn or gunicorn. Your app must read the port from the $PORT environment variable. Prepare your start command — for FastAPI: uvicorn app:app --host 0.0.0.0 --port $PORT, for Flask: gunicorn -b 0.0.0.0:$PORT app:app.

Step-by-step guidance

Step-by-step guidance

  1. Purchase an App Hosting plan or start a free trial from the Services page.
  2. Push your Python project to a public GitHub repository with app.py or main.py at the root.
  3. Include a requirements.txt file listing all dependencies (fastapi, uvicorn, flask, gunicorn, etc.).
  4. Ensure your app reads its port from the $PORT environment variable.
  5. Navigate to Portal → Services and open your App Hosting service.
  6. Set Action to Deploy Python app and Runtime to python_fastapi (for FastAPI/uvicorn) or python_flask (for Flask/gunicorn).
  7. Paste your GitHub repository URL into the Artifact Reference field.
  8. Enter your start command (e.g. uvicorn app:app --host 0.0.0.0 --port $PORT).
  9. Click Redeploy App. The platform creates a virtualenv and runs pip install -r requirements.txt.
  10. No database is provisioned automatically. If your app needs one, deploy PocketBase as a separate service, or connect an external database by adding your own environment variables.
  11. Visit your assigned domain to verify your API is responding.

What CM Cloud support will review

What CM Cloud support will review

Support verifies the repository structure, entry file detection, requirements installation, start command syntax, and health path response after startup.

What is not automated yet

What is not automated yet

The platform does not run database migrations automatically for Python apps. Run migrations as part of your start command or contact support to schedule them separately.

Safety note

Safety note

Reading this article does not trigger payment, provisioning, DNS, registrar, Cloudflare, or provider changes.

Safe next action

Safe next action

Prepare your repository with app.py and requirements.txt, then open the deploy form on your service page.

Contact Support