name: document-intelligence services: api: profiles: ["runtime"] build: context: . command: [ "uv", "run", "uvicorn", "document_intelligence.api.app:create_app", "--factory", "--host", "0.0.0.0", "--port", "8000", ] env_file: .env.example environment: APP_ENV: staging APP_DATABASE_URL: postgresql+asyncpg://document_intelligence_app:local-app-only@postgres:5432/document_intelligence APP_OPENSEARCH_URL: http://opensearch:9200 APP_TEMPORAL_TARGET: temporal:7233 APP_S3_ENDPOINT_URL: http://localstack:4566 APP_OIDC_ISSUER: https://identity.local APP_API_KEY_PEPPER: local-dev-pepper-only APP_MALWARE_SCANNER_COMMAND: clamscan ports: - "127.0.0.1:8000:8000" depends_on: postgres: condition: service_healthy opensearch: condition: service_healthy temporal: condition: service_started localstack: condition: service_started restart: unless-stopped ingestion-worker: profiles: ["runtime"] build: context: . command: ["uv", "run", "python", "-m", "document_intelligence.worker.main"] env_file: .env.example environment: APP_ENV: staging APP_DATABASE_URL: postgresql+asyncpg://document_intelligence_app:local-app-only@postgres:5432/document_intelligence APP_OPENSEARCH_URL: http://opensearch:9200 APP_TEMPORAL_TARGET: temporal:7233 APP_S3_ENDPOINT_URL: http://localstack:4566 APP_OIDC_ISSUER: https://identity.local APP_API_KEY_PEPPER: local-dev-pepper-only APP_MALWARE_SCANNER_COMMAND: clamscan depends_on: postgres: condition: service_healthy opensearch: condition: service_healthy temporal: condition: service_started localstack: condition: service_started restart: unless-stopped postgres: image: postgres:18.4-bookworm environment: POSTGRES_DB: document_intelligence POSTGRES_USER: postgres POSTGRES_PASSWORD: ${LOCAL_POSTGRES_ADMIN_PASSWORD:-local-admin-only} APP_DB_PASSWORD: ${LOCAL_POSTGRES_APP_PASSWORD:-local-app-only} ports: - "127.0.0.1:5439:5432" volumes: - document_intelligence_postgres:/var/lib/postgresql - ./infra/postgres/init:/docker-entrypoint-initdb.d:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d document_intelligence"] interval: 5s timeout: 5s retries: 12 restart: unless-stopped redis: image: redis:8.2-bookworm command: ["redis-server", "--save", "", "--appendonly", "no"] ports: - "127.0.0.1:6381:6379" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 12 restart: unless-stopped opensearch: profiles: ["search"] image: opensearchproject/opensearch:3.7.0 environment: discovery.type: single-node DISABLE_SECURITY_PLUGIN: "true" OPENSEARCH_JAVA_OPTS: "-Xms512m -Xmx512m" ports: - "127.0.0.1:9202:9200" volumes: - document_intelligence_opensearch:/usr/share/opensearch/data healthcheck: test: ["CMD-SHELL", "curl -fsS http://localhost:9200/_cluster/health >/dev/null"] interval: 10s timeout: 5s retries: 18 restart: unless-stopped localstack: profiles: ["storage"] image: localstack/localstack:4.4.0 environment: SERVICES: s3 DEBUG: "0" ports: - "127.0.0.1:4566:4566" volumes: - document_intelligence_localstack:/var/lib/localstack restart: unless-stopped temporal: profiles: ["workflow"] image: temporalio/auto-setup:1.29.3 depends_on: postgres: condition: service_healthy environment: DB: postgres12 DB_PORT: 5432 POSTGRES_USER: postgres POSTGRES_PWD: ${LOCAL_POSTGRES_ADMIN_PASSWORD:-local-admin-only} POSTGRES_SEEDS: postgres ports: - "127.0.0.1:7234:7233" restart: unless-stopped volumes: document_intelligence_postgres: document_intelligence_opensearch: document_intelligence_localstack: