Merge pull request #851 from AppFlowy-IO/use-pgvector-image
chore: use pgvector for postgres image instead of building
This commit is contained in:
commit
5193d011d9
|
|
@ -28,9 +28,7 @@ services:
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
build:
|
image: pgvector/pgvector:pg16
|
||||||
context: ./postgres
|
|
||||||
dockerfile: postgres.Dockerfile
|
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
environment:
|
environment:
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,7 @@ services:
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
build:
|
image: pgvector/pgvector:pg16
|
||||||
context: ./postgres
|
|
||||||
dockerfile: postgres.Dockerfile
|
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=${POSTGRES_USER:-postgres}
|
- POSTGRES_USER=${POSTGRES_USER:-postgres}
|
||||||
- POSTGRES_DB=${POSTGRES_DB:-postgres}
|
- POSTGRES_DB=${POSTGRES_DB:-postgres}
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,7 @@ services:
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
build:
|
image: pgvector/pgvector:pg16
|
||||||
context: ./postgres
|
|
||||||
dockerfile: postgres.Dockerfile
|
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=${POSTGRES_USER:-postgres}
|
- POSTGRES_USER=${POSTGRES_USER:-postgres}
|
||||||
- POSTGRES_DB=${POSTGRES_DB:-postgres}
|
- POSTGRES_DB=${POSTGRES_DB:-postgres}
|
||||||
|
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
FROM postgres:latest
|
|
||||||
|
|
||||||
# Install dependencies required for pgjwt and locales
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install --fix-missing -y \
|
|
||||||
build-essential \
|
|
||||||
postgresql-server-dev-all \
|
|
||||||
git \
|
|
||||||
locales && \
|
|
||||||
apt-get clean && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Setup locale
|
|
||||||
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
|
||||||
locale-gen en_US.UTF-8 && \
|
|
||||||
update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
|
|
||||||
|
|
||||||
ENV LANG en_US.UTF-8
|
|
||||||
ENV LANGUAGE en_US:en
|
|
||||||
ENV LC_ALL en_US.UTF-8
|
|
||||||
|
|
||||||
# Clone and build pgjwt
|
|
||||||
RUN rm -rf pgjwt && \
|
|
||||||
git clone https://github.com/michelp/pgjwt.git && \
|
|
||||||
cd pgjwt && \
|
|
||||||
make && \
|
|
||||||
make install
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
# This is installing the pgvector extension for postgres
|
|
||||||
FROM postgres:latest
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
build-essential \
|
|
||||||
git \
|
|
||||||
postgresql-server-dev-all \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN git clone https://github.com/pgvector/pgvector.git
|
|
||||||
|
|
||||||
WORKDIR /tmp/pgvector
|
|
||||||
RUN make
|
|
||||||
RUN make install
|
|
||||||
Loading…
Reference in New Issue