diff --git a/build/entrypoint.sh b/build/entrypoint.sh index bc0857ae..17830eeb 100755 --- a/build/entrypoint.sh +++ b/build/entrypoint.sh @@ -3,13 +3,13 @@ # If we are using podman or docker compose use the repo config.toml if [[ -f /podman_compose/kai/config.toml ]]; then cp /podman_compose/kai/config.toml /kai/kai/config.toml - sed -i "s/^host =.*/host = \"${POSTGRES_HOST}\"/g" /kai/kai/config.toml - sed -i "s/^database =.*/database = \"${POSTGRES_DB}\"/g" /kai/kai/config.toml - sed -i "s/^user =.*/user = \"${POSTGRES_USER}\"/g" /kai/kai/config.toml - sed -i "s/^password =.*/password =\"${POSTGRES_PASSWORD}\"/g" /kai/kai/config.toml + sed -i "s/^host =.*/host = \"${POSTGRESQL_HOST}\"/g" /kai/kai/config.toml + sed -i "s/^database =.*/database = \"${POSTGRESQL_DATABASE}\"/g" /kai/kai/config.toml + sed -i "s/^user =.*/user = \"${POSTGRESQL_USER}\"/g" /kai/kai/config.toml + sed -i "s/^password =.*/password =\"${POSTGRESQL_PASSWORD}\"/g" /kai/kai/config.toml fi -until PGPASSWORD="${POSTGRES_PASSWORD}" pg_isready -q -h "${POSTGRES_HOST}" -U "${POSTGRES_USER}" -d "${POSTGRES_DB}"; do +until PGPASSWORD="${POSTGRESQL_PASSWORD}" pg_isready -q -h "${POSTGRESQL_HOST}" -U "${POSTGRESQL_USER}" -d "${POSTGRESQL_DATABASE}"; do sleep 1 done @@ -19,7 +19,7 @@ if [[ ${MODE} != "importer" ]]; then SQL_EXISTS=$(printf "\dt %s" "${TABLE}") STDERR="Did not find any relation" # trunk-ignore(shellcheck/SC2312) - if PGPASSWORD="${POSTGRES_PASSWORD}" psql -h "${POSTGRES_HOST}" -U "${POSTGRES_USER}" -d "${POSTGRES_DB}" -c "${SQL_EXISTS}" 2>&1 | grep -q -v "${STDERR}"; then + if PGPASSWORD="${POSTGRESQL_PASSWORD}" psql -h "${POSTGRESQL_HOST}" -U "${POSTGRESQL_USER}" -d "${POSTGRESQL_DATABASE}" -c "${SQL_EXISTS}" 2>&1 | grep -q -v "${STDERR}"; then echo "################################################" echo "load-data has run already run, starting server.#" echo "################################################" diff --git a/compose.yaml b/compose.yaml index c466df7d..ab421eb9 100644 --- a/compose.yaml +++ b/compose.yaml @@ -10,10 +10,10 @@ x-kai-variables: &kai-variables USE_HUB_IMPORTER: ${USE_HUB_IMPORTER:-False} x-db-variables: &db-variables - POSTGRES_DB: kai - POSTGRES_PASSWORD: dog8code - POSTGRES_USER: kai - POSTGRES_HOST: kai_db + POSTGRESQL_DATABASE: kai + POSTGRESQL_PASSWORD: dog8code + POSTGRESQL_USER: kai + POSTGRESQL_HOST: kai_db services: kai: @@ -47,7 +47,7 @@ services: profiles: - use_hub_importer kai_db: - image: docker.io/pgvector/pgvector:pg15 + image: quay.io/sclorg/postgresql-15-c9s:latest environment: <<: *db-variables volumes: