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
- Purchase an App Hosting plan or start a free trial from the Services page.
- Push your Python project to a public GitHub repository with app.py or main.py at the root.
- Include a requirements.txt file listing all dependencies (fastapi, uvicorn, flask, gunicorn, etc.).
- Ensure your app reads its port from the $PORT environment variable.
- Navigate to Portal → Services and open your App Hosting service.
- Set Action to Deploy Python app and Runtime to python_fastapi (for FastAPI/uvicorn) or python_flask (for Flask/gunicorn).
- Paste your GitHub repository URL into the Artifact Reference field.
- Enter your start command (e.g. uvicorn app:app --host 0.0.0.0 --port $PORT).
- Click Redeploy App. The platform creates a virtualenv and runs pip install -r requirements.txt.
- 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.
- 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.