Deployment
Fastman applications are standard FastAPI applications, so they can be deployed anywhere Python is supported.
Docker
Fastman generates a Dockerfile for you when you create a new project.
-
Build the image:
docker build -t my-app . -
Run the container:
docker run -d -p 8000:8000 my-app
Manual Deployment (Gunicorn/Uvicorn)
For production, it is recommended to use Gunicorn with Uvicorn workers.
pip install gunicorn
gunicorn -w 4 -k uvicorn.workers.UvicornWorker app.main:app
Cloud Providers
Heroku
- Create a
Procfile:web: gunicorn -w 4 -k uvicorn.workers.UvicornWorker app.main:app - Push to Heroku.
AWS / Google Cloud / Azure
Deploy as a standard Docker container or Python application.