services: core: profiles: [local-vector] environment: THT_VECTOR_DATABASE: "${THT_VECTOR_DATABASE:-thoth}" THT_VECTOR_BOOTSTRAP_USER: "${THT_VECTOR_BOOTSTRAP_USER:-postgres}" THT_VECTOR_READER_USER: "${THT_VECTOR_READER_USER:-thoth_vector_reader}" THT_VECTOR_WRITER_USER: "${THT_VECTOR_WRITER_USER:-thoth_vector_writer}" THT_SECRETS_FILE: /run/secrets/thothii.secrets secrets: [{source: thothii_secrets, target: thothii.secrets}] depends_on: vector-migrate: condition: service_completed_successfully frontend: profiles: [local-vector] vector-db: image: pgvector/pgvector:0.8.5-pg16@sha256:1d533553fefe4f12e5d80c7b80622ba0c382abb5758856f52983d8789179f0fb profiles: [local-vector] labels: {io.thothii.smoke-owner: "${THOTH_SMOKE_OWNER:-operator}"} environment: POSTGRES_DB: "${THT_VECTOR_DATABASE:-thoth}" POSTGRES_USER: "${THT_VECTOR_BOOTSTRAP_USER:-postgres}" THT_VECTOR_MIGRATOR_USER: "${THT_VECTOR_MIGRATOR_USER:-thoth_vector_migrator}" THT_VECTOR_READER_USER: "${THT_VECTOR_READER_USER:-thoth_vector_reader}" THT_VECTOR_WRITER_USER: "${THT_VECTOR_WRITER_USER:-thoth_vector_writer}" THT_SECRETS_FILE: /run/secrets/thothii.secrets secrets: [{source: thothii_secrets, target: thothii.secrets}] entrypoint: [/opt/thoth/vector-db-entrypoint.sh] volumes: - vector_data:/var/lib/postgresql/data - ./deploy/vector/vector-db-entrypoint.sh:/opt/thoth/vector-db-entrypoint.sh:ro - ./deploy/vector/secret-policy.sh:/opt/thoth/secret-policy.sh:ro healthcheck: test: [CMD-SHELL, "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"] interval: 5s timeout: 3s retries: 20 start_period: 10s restart: unless-stopped vector-reconcile: image: pgvector/pgvector:0.8.5-pg16@sha256:1d533553fefe4f12e5d80c7b80622ba0c382abb5758856f52983d8789179f0fb profiles: [local-vector] labels: {io.thothii.smoke-owner: "${THOTH_SMOKE_OWNER:-operator}"} environment: PGHOST: vector-db PGPORT: 5432 PGDATABASE: "${THT_VECTOR_DATABASE:-thoth}" PGUSER: "${THT_VECTOR_BOOTSTRAP_USER:-postgres}" THT_VECTOR_BOOTSTRAP_USER: "${THT_VECTOR_BOOTSTRAP_USER:-postgres}" THT_VECTOR_MIGRATOR_USER: "${THT_VECTOR_MIGRATOR_USER:-thoth_vector_migrator}" THT_VECTOR_READER_USER: "${THT_VECTOR_READER_USER:-thoth_vector_reader}" THT_VECTOR_WRITER_USER: "${THT_VECTOR_WRITER_USER:-thoth_vector_writer}" THT_SECRETS_FILE: /run/secrets/thothii.secrets entrypoint: [/opt/thoth/reconcile-roles.sh] secrets: [{source: thothii_secrets, target: thothii.secrets}] volumes: - ./deploy/vector/reconcile-roles.sh:/opt/thoth/reconcile-roles.sh:ro - ./deploy/vector/secret-policy.sh:/opt/thoth/secret-policy.sh:ro depends_on: vector-db: {condition: service_healthy} restart: "no" vector-migrate: image: thothii-core:local profiles: [local-vector] labels: {io.thothii.smoke-owner: "${THOTH_SMOKE_OWNER:-operator}"} build: context: . dockerfile: docker/core.Dockerfile entrypoint: [sh, -ec] command: - | . /opt/thoth/secret-policy.sh export PGPASSWORD=$$(read_bundle_secret /run/secrets/thothii.secrets THT_VECTOR_MIGRATOR_PASSWORD) exec /opt/venv/bin/tht vector migrate --database-url "postgresql+psycopg2://${THT_VECTOR_MIGRATOR_USER:-thoth_vector_migrator}@vector-db:5432/${THT_VECTOR_DATABASE:-thoth}" --json secrets: [{source: thothii_secrets, target: thothii.secrets}] environment: THT_SECRETS_FILE: /run/secrets/thothii.secrets volumes: - ./deploy/vector/secret-policy.sh:/opt/thoth/secret-policy.sh:ro depends_on: vector-reconcile: {condition: service_completed_successfully} restart: "no" volumes: vector_data: labels: {io.thothii.smoke-owner: "${THOTH_SMOKE_OWNER:-operator}"}