CI / ruff · pytest (pull_request) Successful in 2m34s
Requirement: no extra software beyond the regulated set. The web app is built in a Node stage and served by nginx (:8080, /api → app, SSE unbuffered); the server override keeps it off (host nginx serves the bundle). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
61 lines
1.8 KiB
YAML
61 lines
1.8 KiB
YAML
# Local / demo stack. Works offline once images are built: LLM_PROVIDER=mock by default (ADR-004).
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
|
IDENTITY_DB_PASSWORD: ${IDENTITY_DB_PASSWORD:-identity_app}
|
|
CLINICAL_DB_PASSWORD: ${CLINICAL_DB_PASSWORD:-clinical_app}
|
|
TZ: ${TZ:-Europe/Moscow}
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
- ./infra/postgres/init.sh:/docker-entrypoint-initdb.d/10-init.sh:ro
|
|
ports:
|
|
- "127.0.0.1:5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 3s
|
|
timeout: 3s
|
|
retries: 20
|
|
|
|
app:
|
|
build: .
|
|
env_file: .env
|
|
environment:
|
|
IDENTITY_DB_URL: postgresql+asyncpg://identity_app:${IDENTITY_DB_PASSWORD:-identity_app}@postgres:5432/identity
|
|
CLINICAL_DB_URL: postgresql+asyncpg://clinical_app:${CLINICAL_DB_PASSWORD:-clinical_app}@postgres:5432/clinical
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
ports:
|
|
- "8000:8000"
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 20
|
|
|
|
dashboard:
|
|
build: .
|
|
command: ["streamlit", "run", "dashboard/app.py", "--server.port=8501", "--server.address=0.0.0.0", "--browser.gatherUsageStats=false"]
|
|
environment:
|
|
API_BASE_URL: http://app:8000
|
|
depends_on:
|
|
app:
|
|
condition: service_healthy
|
|
ports:
|
|
- "8501:8501"
|
|
|
|
web:
|
|
# Patient web app (React) — built inside Docker, no Node needed on the host.
|
|
build: ./web
|
|
depends_on:
|
|
app:
|
|
condition: service_healthy
|
|
ports:
|
|
- "8080:80"
|
|
|
|
volumes:
|
|
pgdata:
|