refactor(docker): 重构本地开发环境配置

将通用Dockerfile重命名为Dockerfile.php以明确用途
添加PostgreSQL自定义镜像配置以支持pgvector扩展
拆分数据库初始化脚本为mysql和postgres专用版本
更新docker-compose配置以使用新的构建文件
This commit is contained in:
Kenny Yang committed 2025-05-29 01:43:17 +08:00
1 parent 41a1e57855
commit 4c9e71955e
6 files changed
+38 -5

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
# /home/app/Dockerfile.postgres
FROM postgres:14
# 安装构建工具
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
postgresql-server-dev-14 \
git \
ca-certificates && \
rm -rf /var/lib/apt/lists/*
# 编译安装 pgvector
RUN cd /tmp && \
git clone --branch v0.6.2 https://github.com/pgvector/pgvector.git && \
cd pgvector && \
make && \
make install && \
rm -rf /tmp/pgvector
# 清理构建工具
RUN apt-get purge -y --auto-remove \
build-essential \
postgresql-server-dev-14 \
git && \
rm -rf /var/cache/apt/archives