Working with both extensions now

This commit is contained in:
Ryan Voots 2023-12-31 13:07:56 -05:00
parent 44dd70f0d2
commit 6b161e500c
3 changed files with 15 additions and 2 deletions

View file

@ -22,11 +22,12 @@ RUN git clone --branch $PGVECTOR_REF --depth 1 https://github.com/pgvector/pgvec
WORKDIR /tmp/pgvector/
RUN make && make install
COPY docker-entrypoint-initdb.d/* /docker-entrypoint-initdb.d/
COPY --from=timebuild /go/bin/* /usr/local/bin/
RUN git clone --branch $TS_REF https://github.com/timescale/timescaledb /tmp/timescaledb
WORKDIR /tmp/timescaledb
RUN ./bootstrap -DCMAKE_BUILD_TYPE=RelWithDebInfo -DREGRESS_CHECKS=OFF -DTAP_CHECKS=OFF -DGENERATE_DOWNGRADE_SCRIPT=ON -DWARNINGS_AS_ERRORS=OFF -DPROJECT_INSTALL_METHOD="docker"
RUN cd build && make && make install
RUN sed -r -i "s/[#]*\s*(shared_preload_libraries)\s*=\s*'(.*)'/\1 = 'timescaledb,\2'/;s/,'/'/" /usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample
COPY docker-entrypoint-initdb.d/* /docker-entrypoint-initdb.d/
WORKDIR /

12
docker-compose.yml Normal file
View file

@ -0,0 +1,12 @@
version: '3.1'
services:
db:
build: .
restart: unless-stopped
environment:
POSTGRES_PASSWORD: pass
POSTGRES_USER: user
POSTGRES_DB: aimach

View file

@ -22,7 +22,7 @@ if [ -z "${POSTGRESQL_CONF_DIR:-}" ]; then
fi
cat <<EOF >${create_sql}
CREATE EXTENSION IF NOT EXISTS pgvector CASCADE;
CREATE EXTENSION IF NOT EXISTS vector CASCADE;
EOF
if [ -z "${POSTGRESQL_PASSWORD:-}" ]; then