formatting
This commit is contained in:
@@ -22,10 +22,10 @@ Bring an existing Python project into full conformance with cloud-native best pr
|
||||
|
||||
Load these references only when needed:
|
||||
|
||||
- FastAPI patterns and app structure: [./references/fastapi-best-practices.md](./references/fastapi-best-practices.md)
|
||||
- uv project layout and dependency management: [./references/uv-project-layout.md](./references/uv-project-layout.md)
|
||||
- uvicorn CLI settings reference: [./references/uvicorn-settings.md](./references/uvicorn-settings.md)
|
||||
- Docker and cloud-native patterns: [./references/docker-cloud-native.md](./references/docker-cloud-native.md)
|
||||
- FastAPI patterns and app structure: [FastAPI best practices](./references/fastapi-best-practices.md)
|
||||
- uv project layout and dependency management: [uv project layout](./references/uv-project-layout.md)
|
||||
- uvicorn CLI settings reference: [uvicorn settings](./references/uvicorn-settings.md)
|
||||
- Docker and cloud-native patterns: [Docker cloud-native patterns](./references/docker-cloud-native.md)
|
||||
|
||||
---
|
||||
|
||||
@@ -44,9 +44,9 @@ Before making changes, map the current state across six areas. Produce a short g
|
||||
| **Container** | Is there a `Dockerfile`? Multi-stage? Non-root user? `.dockerignore` present? |
|
||||
| **Cloud-native** | Is there a `/healthz` endpoint? Graceful shutdown? Structured logs? |
|
||||
|
||||
Load [./references/fastapi-best-practices.md](./references/fastapi-best-practices.md) for structure rules.
|
||||
Load [./references/uv-project-layout.md](./references/uv-project-layout.md) for uv migration rules.
|
||||
Load [./references/uvicorn-settings.md](./references/uvicorn-settings.md) for uvicorn CLI reference.
|
||||
Load the [FastAPI best practices reference](./references/fastapi-best-practices.md) for structure rules.
|
||||
Load the [uv project layout reference](./references/uv-project-layout.md) for uv migration rules.
|
||||
Load the [uvicorn settings reference](./references/uvicorn-settings.md) for uvicorn CLI reference.
|
||||
|
||||
Completion check: You can name every gap before touching any file.
|
||||
|
||||
@@ -145,7 +145,7 @@ Completion check: `uv run python -m my_app` starts the server.
|
||||
|
||||
### Step 3: Wire the FastAPI App Factory
|
||||
|
||||
Load [./references/fastapi-best-practices.md](./references/fastapi-best-practices.md) for the full patterns. Key rules:
|
||||
Load the [FastAPI best practices reference](./references/fastapi-best-practices.md) for the full patterns. Key rules:
|
||||
|
||||
**`src/my_app/main.py`:**
|
||||
|
||||
@@ -211,7 +211,7 @@ Completion check: `uv run uvicorn my_app.main:app --reload` starts with no impor
|
||||
|
||||
### Step 4: uvicorn Production Configuration
|
||||
|
||||
Load [./references/uvicorn-settings.md](./references/uvicorn-settings.md) for the full settings reference.
|
||||
Load the [uvicorn settings reference](./references/uvicorn-settings.md) for the full settings reference.
|
||||
|
||||
**Never** configure uvicorn inside application code. Pass all settings via CLI or environment variables (`UVICORN_*` prefix).
|
||||
|
||||
@@ -270,7 +270,7 @@ Completion check: `curl http://localhost:8000/healthz` returns `{"status":"ok"}`
|
||||
|
||||
### Step 5: Write the Dockerfile
|
||||
|
||||
Load [./references/docker-cloud-native.md](./references/docker-cloud-native.md) for the full template and cloud-native rules. Key requirements:
|
||||
Load the [Docker cloud-native patterns reference](./references/docker-cloud-native.md) for the full template and cloud-native rules. Key requirements:
|
||||
|
||||
- Multi-stage build: `builder` stage installs deps; `runtime` stage is slim.
|
||||
- Pin uv version (copy from official image, not `latest`).
|
||||
|
||||
Reference in New Issue
Block a user