chore(compose): use DaoCloud mirror for base images in prod/dev

Made-with: Cursor
This commit is contained in:
Kevin
2026-04-27 17:19:34 +08:00
parent 57dcfee569
commit 5ca6ce71e0
2 changed files with 7 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
# 本地仅起 PostgreSQL + MinIOFastAPI 在宿主机跑(如 ./start.sh、uv run uvicorn # 本地仅起 PostgreSQL + MinIOFastAPI 在宿主机跑(如 ./start.sh、uv run uvicorn
# 基础镜像经 DaoCloud 公开镜像大陆可访问docker.io → docker.m.daocloud.io
# #
# docker compose -f docker-compose.dev.yml up -d # docker compose -f docker-compose.dev.yml up -d
# #
@@ -8,7 +9,7 @@
services: services:
db: db:
image: postgres:16-alpine image: docker.m.daocloud.io/library/postgres:16-alpine
environment: environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
@@ -26,7 +27,7 @@ services:
# S3 兼容:语音确认原始 WAV与本项目 .env 中 MINIO_ACCESS_KEY / MINIO_SECRET_KEY 一致 # S3 兼容:语音确认原始 WAV与本项目 .env 中 MINIO_ACCESS_KEY / MINIO_SECRET_KEY 一致
minio: minio:
image: minio/minio:latest image: docker.m.daocloud.io/minio/minio:latest
command: server /data --console-address ":9001" command: server /data --console-address ":9001"
environment: environment:
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY:-minioadmin} MINIO_ROOT_USER: ${MINIO_ACCESS_KEY:-minioadmin}

View File

@@ -1,6 +1,9 @@
# Production stack for the current codebase: FastAPI + PostgreSQL. # 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. # 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
# See https://github.com/DaoCloud/public-image-mirror
#
# Published API port defaults to 38080 on the host (override with API_PORT). # 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). # GPU (NVIDIA) inference: uv.lock pins torch/torchvision from the PyTorch *CPU* index (see pyproject.toml).
@@ -8,7 +11,7 @@
# and assign GPUs to the api service (deploy.resources.reservations.devices). # and assign GPUs to the api service (deploy.resources.reservations.devices).
services: services:
db: db:
image: postgres:16-alpine image: docker.m.daocloud.io/library/postgres:16-alpine
environment: environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD}