Optimized for: Gemini / ChatGPT / Claude
Advanced AI Prompt for Python FastAPI with Uvicorn Tuning
Use this engineered prompt to drastically optimize your workflow and output.
Required Variables
- ✦
[WORKER_COUNT] - ✦
[UVICORN_RELOAD] - ✦
[LOG_LEVEL] - ✦
[PYTHON_SLIM_TAG]
python-fastapi-uvicorn-docker-tuning.txt
Generate a production-grade Dockerfile for a FastAPI application using [PYTHON_SLIM_TAG]. Implement a multi-stage build that uses a 'builder' stage for pip installations. In the 'runner' stage, configure Uvicorn with [WORKER_COUNT] workers, [LOG_LEVEL], and optimized networking parameters. Integrate a Gunicorn worker class if necessary for process management. Ensure the Dockerfile follows 'Twelve-Factor App' principles for environment variables and logging.
Example Output
"A performance-tuned Dockerfile for Python web APIs, providing high concurrency and low-latency startup configurations."