You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"level":"info","ts":"2024-11-08T08:47:59.738349871Z","logger":"pg_ctl","msg":"waiting for server to start....2024-11-08 08:47:59.738 UTC [30] FATAL: could not access file "vectors.so": No such file or directory","pipe":"stdout","logging_pod":"ecran-vector-cluster-1-initdb"}
kubernetes manifest
apiVersion: postgresql.cnpg.io/v1kind: Clustermetadata:
name: ecran-vector-clusternamespace: ecranspec:
instances: 3bootstrap:
initdb:
database: ecranpostInitApplicationSQL:
- ALTER SYSTEM SET search_path TO "$user", public, vectors;
- CREATE EXTENSION IF NOT EXISTS "vectors";
- ALTER SYSTEM SET shared_preload_libraries = 'vectors';owner: ecransecret:
name: ecran-cluster-secretdataChecksums: trueencoding: "UTF8"storage:
size: 5GiimageName: kalmyk.duckdns.org/lab/vecteur:16.4imagePullSecrets:
- name: kalmyk-registrypostgresql:
shared_preload_libraries:
- "vectors.so"
Dockerfile
# syntax=docker/dockerfile-upstream:master
FROM ghcr.io/cloudnative-pg/postgresql:16
ARG CNPG_TAG
ARG PGVECTORS_TAG
ARG TARGETARCH
# drop to root to install packages
USER root
# install pgvecto.rs
ADD https://github.com/tensorchord/pgvecto.rs/releases/download/$PGVECTORS_TAG/vectors-pg${CNPG_TAG%.*}_${PGVECTORS_TAG#"v"}_$TARGETARCH.deb ./pgvectors.deb
RUN apt install ./pgvectors.deb
USER postgres
bash script to build image
#!/bin/bash# Set variables
IMAGE_NAME="kalmyk.duckdns.org/lab/vecteur"
DOCKERFILE="services/vecteur/Dockerfile"
CONTEXT_PATH="services/vecteur"
TARGETARCH="arm64"
CNPG_TAG="16"# Check if a tag is provided as an argumentif [ $#-eq 1 ];then
TAG=$1else# If no tag is provided, use the current date and time
TAG=$(date +"%Y%m%d_%H%M%S")fi# Full image name with tag
FULL_IMAGE_NAME="${IMAGE_NAME}:${TAG}"# Build the Docker imageecho"Building Docker image: ${FULL_IMAGE_NAME}"
docker buildx build \
--platform linux/${TARGETARCH} \
--build-arg PGVECTORS_TAG=v0.3.0 \
--build-arg TARGETARCH=${TARGETARCH} \
--build-arg CNPG_TAG=${CNPG_TAG} \
-t ${FULL_IMAGE_NAME} \
-f ${DOCKERFILE}${CONTEXT_PATH} \
--push
# Check if the build was successfulif [ $?-eq 0 ];thenecho"Docker image built and pushed successfully: ${FULL_IMAGE_NAME}"elseecho"Docker image build or push failed"exit 1
fi
The text was updated successfully, but these errors were encountered:
version 0.3
{"level":"info","ts":"2024-11-08T08:47:59.738349871Z","logger":"pg_ctl","msg":"waiting for server to start....2024-11-08 08:47:59.738 UTC [30] FATAL: could not access file "vectors.so": No such file or directory","pipe":"stdout","logging_pod":"ecran-vector-cluster-1-initdb"}
kubernetes manifest
Dockerfile
bash script to build image
The text was updated successfully, but these errors were encountered: