chore(deploy): 本地部署脚本、容器配置与运行说明
PostgreSQL/pgvector 与 Redis 独立容器,后端、worker、前端可一键启停;不覆盖既有密钥。
This commit is contained in:
1 parent
e0baca15a9
commit
18732801b5
18 files changed
+1796
No files matched your search
@@ -0,0 +1,31 @@
|
||||
FROM postgres:16
|
||||
|
||||
# Install build dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
git \
|
||||
postgresql-server-dev-16 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install pg_vector extension with compatibility fixes for ARM64
|
||||
RUN git clone https://github.com/pgvector/pgvector.git && \
|
||||
cd pgvector && \
|
||||
git checkout v0.5.1 && \
|
||||
make OPTFLAGS="" && \
|
||||
make install
|
||||
|
||||
# Add initialization scripts
|
||||
COPY ./backend/scripts/init-vector.sql /docker-entrypoint-initdb.d/
|
||||
|
||||
# Set environment variables
|
||||
ENV POSTGRES_DB=replypier
|
||||
ENV POSTGRES_USER=postgres
|
||||
ENV POSTGRES_PASSWORD=postgres
|
||||
|
||||
# Set PostgreSQL configuration for better stability with pgvector
|
||||
RUN echo "shared_preload_libraries = 'vector'" >> /usr/share/postgresql/postgresql.conf.sample
|
||||
RUN echo "max_connections = 200" >> /usr/share/postgresql/postgresql.conf.sample
|
||||
RUN echo "shared_buffers = 256MB" >> /usr/share/postgresql/postgresql.conf.sample
|
||||
|
||||
# Expose PostgreSQL port
|
||||
EXPOSE 5432
|
||||
Reference in new issue
Block a user