name: ${INKCRE_COMPOSE_PROJECT_NAME:-inkcre} x-core-image: &core-image image: ${INKCRE_CORE_IMAGE:-inkcre-core-py:development} x-core-build: &core-build context: ${INKCRE_BUILD_CONTEXT:-.} target: runtime args: SOURCE_REVISION: ${INKCRE_SOURCE_REVISION:-local} services: postgres: image: pgvector/pgvector:pg17@sha256:d2ef61f42ef767baa5a1475393303cc235bcd92febd9d7014eddb48b41f3bad0 environment: POSTGRES_DB: ${POSTGRES_DB:-inkcre} POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} volumes: - postgres_data:/var/lib/postgresql/data ports: - "127.0.0.1:${POSTGRES_PORT:-5432}:5432" healthcheck: test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-inkcre}", ] interval: 5s timeout: 5s retries: 12 init: <<: *core-image build: *core-build command: ["python", "scripts/container.py", "db", "init", "--profile", "development"] depends_on: postgres: condition: service_healthy environment: CORE_DATABASE_PASSWORD: ${CORE_DATABASE_PASSWORD:-local-core-database-password-at-least-32-bytes} MIGRATION_DATABASE_URL: "postgresql+psycopg://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-inkcre}" POSTGREST_DATABASE_PASSWORD: ${POSTGREST_DATABASE_PASSWORD:-local-postgrest-database-password-at-least-32-bytes} core: <<: *core-image command: ["python", "scripts/container.py", "web"] depends_on: init: condition: service_completed_successfully environment: PEER_ID: 00000000-0000-4000-8000-000000000002 PEER_LEASE_RENEW_INTERVAL_SECONDS: ${PEER_LEASE_RENEW_INTERVAL_SECONDS:-1} PEER_NAME: core-py-development DATABASE_URL: "postgresql+psycopg://inkcre_core:${CORE_DATABASE_PASSWORD:-local-core-database-password-at-least-32-bytes}@postgres:5432/${POSTGRES_DB:-inkcre}" INKCRE_ENV_FILE: "" JWT_SECRET: ${JWT_SECRET:-local-development-jwt-secret-at-least-32-bytes} OBSRV__LOGGING_BACKEND: ${OBSRV__LOGGING_BACKEND:-postgresql} OBSRV__TELEMETRY_ENABLED: ${OBSRV__TELEMETRY_ENABLED:-false} OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-} OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: ${OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:-} OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: ${OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:-} OTEL_EXPORTER_OTLP_HEADERS: ${OTEL_EXPORTER_OTLP_HEADERS:-} OTEL_EXPORTER_OTLP_TIMEOUT: ${OTEL_EXPORTER_OTLP_TIMEOUT:-10} OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: ${OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:-} OTEL_EXPORTER_OTLP_LOGS_TIMEOUT: ${OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:-} OTEL_EXPORTER_OTLP_METRICS_TIMEOUT: ${OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:-} OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: ${OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED:-true} OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${OTEL_EXPORTER_OTLP_TRACES_HEADERS:-} OTEL_EXPORTER_OTLP_LOGS_HEADERS: ${OTEL_EXPORTER_OTLP_LOGS_HEADERS:-} OTEL_EXPORTER_OTLP_METRICS_HEADERS: ${OTEL_EXPORTER_OTLP_METRICS_HEADERS:-} PORT: 8000 ports: - "127.0.0.1:${CORE_PORT:-8000}:8000" healthcheck: test: [ "CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/readyz')", ] interval: 10s timeout: 5s retries: 6 restart: unless-stopped postgrest: image: postgrest/postgrest:v14.15@sha256:2f8e7b656f09db697a8875177694b417b35cb76c21370de07fc54e711e902326 depends_on: init: condition: service_completed_successfully environment: PGRST_DB_ANON_ROLE: anonymous PGRST_DB_PRE_REQUEST: inkcre_internal.check_jwt PGRST_DB_SCHEMAS: inkcre PGRST_DB_URI: "postgresql://authenticator:${POSTGREST_DATABASE_PASSWORD:-local-postgrest-database-password-at-least-32-bytes}@postgres:5432/${POSTGRES_DB:-inkcre}" PGRST_JWT_AUD: inkcre-api PGRST_JWT_SECRET: ${JWT_SECRET:-local-development-jwt-secret-at-least-32-bytes} PGRST_SERVER_PORT: 3000 ports: - "127.0.0.1:${POSTGREST_PORT:-3000}:3000" restart: unless-stopped volumes: postgres_data: