Files
lingxi/infra/docker-compose.dev.yaml
T
Stev_Wang 620cb93a46
ci / 质量门禁 (push) Canceled after 0s
fix(infra): 本地 PG/Redis 复用已有 Docker 服务
背景:此前误将宿主端口冲突当作新建 compose 服务的理由,实际应按技术架构使用本机已有 PostgreSQL/Redis。

改动:
- 删除 lingxi-pg / lingxi-redis 容器及数据卷,不再另起数据库;
- DATABASE_URL 改回 127.0.0.1:5432/lingxi,REDIS_URL 改回 127.0.0.1:6379;
- 在已有 docker-postgres-1 中创建 lingxi 库并执行迁移/seed;
- compose 仅保留无法拉取镜像的 S3 兼容服务;
- README、A0 报告同步依赖来源。

影响面:仅本地开发依赖与文档;代码/接口/数据模型不变。
回滚方式:git revert 本提交,并按旧 compose 重新初始化(不推荐)。
验证:migrate deploy、db:seed、test:int、pnpm ci:local(85.9s)全部通过。
2026-11-02 18:21:09 +08:00

34 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 灵犀 · 本地开发对象存储(S3 协议兼容)
# 用法:pnpm compose:up / pnpm compose:down
#
# 数据库与 Redis 复用本机已有 Docker 服务,不再由本文件创建:
# PostgreSQL → docker-postgres-1,127.0.0.1:5432,库 lingxi / 用户 postgres / 密码 postgres
# Redis → docker-redis-1,127.0.0.1:6379
# 本文件只管理 S3 兼容服务:2026-11 实测 minio/minio 与 minio/mc 镜像在当前网络不可拉取,
# 本地改用 Adobe S3Mock 提供 assets/renders/temp/archive 四个桶;接入真实 MinIO 时仅替换本服务。
name: lingxi-dev
services:
s3:
image: adobe/s3mock:latest
container_name: lingxi-s3
environment:
COM_ADOBE_TESTING_S3MOCK_STORE_INITIAL_BUCKETS: assets,renders,temp,archive
COM_ADOBE_TESTING_S3MOCK_STORE_REGION: us-east-1
COM_ADOBE_TESTING_S3MOCK_STORE_ROOT: /s3mockroot
COM_ADOBE_TESTING_S3MOCK_STORE_RETAIN_FILES_ON_EXIT: 'true'
ports:
- '19000:9090'
- '19001:9191'
volumes:
- lingxi-s3-data:/s3mockroot
healthcheck:
test: ['CMD-SHELL', 'wget -q -O /dev/null http://127.0.0.1:9090/ || exit 1']
interval: 5s
timeout: 3s
retries: 20
start_period: 20s
volumes:
lingxi-s3-data: