Compare commits

..

6 Commits

Author SHA1 Message Date
Kevin
70048e78ca update prod env 2026-04-28 10:26:16 +08:00
Kevin
a36e9b1e6a update prod env 2026-04-28 10:25:00 +08:00
Kevin
4fed3b1ca8 update prod env 2026-04-28 10:18:00 +08:00
Kevin
2b17cba9cb update prod env 2026-04-28 10:15:00 +08:00
Kevin
ad31f8246e update prod env 2026-04-27 18:00:25 +08:00
Kevin
2694c8962f update prod env 2026-04-27 17:52:34 +08:00

View File

@@ -1,9 +1,12 @@
# Production stack for the current codebase: FastAPI + PostgreSQL.
# The API hard-fails on startup if the database is not reachable, so DB health is required.
#
# Base images use DaoCloud public mirror (大陆可访问): docker.io → docker.m.daocloud.io
# Base images: DaoCloud「增加前缀」镜像README 推荐,减少 BuildKit 直连 registry-1.docker.io
# See https://github.com/DaoCloud/public-image-mirror
#
# The ``api`` service is built from ``Dockerfile``: Debian apt → 阿里云, uv/PyPI → 清华,
# PyTorch CPU wheels / pytorch.org index files → 南大镜像; see Dockerfile for details.
#
# Published API port defaults to 38080 on the host (override with API_PORT).
#
# GPU (NVIDIA) inference: uv.lock pins torch/torchvision from the PyTorch *CPU* index (see pyproject.toml).
@@ -11,7 +14,7 @@
# and assign GPUs to the api service (deploy.resources.reservations.devices).
services:
db:
image: docker.m.daocloud.io/library/postgres:16-alpine
image: m.daocloud.io/docker.io/library/postgres:16-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD}