All notes

Note · 2026-06-05

Deploying a Python + WeasyPrint app on Alibaba Function Compute 3.0

Three things that bit us. (1) ACR EE Economy tier can't be pulled by FC 3.0 — you need Basic or higher, or pivot to ghcr.io. (2) `uv run uvicorn` re-syncs deps at startup and that re-sync tries to install the project editable, which fails if pyproject.toml's license = file ref isn't in the image. Use `license = "MIT"` SPDX string. (3) Background tasks may not complete after the response in FC's default freeze behavior — process work in the request, not after.

The good: cold start is acceptable (~3s) once the image is warm, custom-container is genuinely flexible, and the public HTTPS endpoint just works. Cost at our scale (low thousands of invocations) is dollars per month.