chore(devops): project skeleton — uv, docker compose, Makefile, CI
CI / ruff · pytest (pull_request) Successful in 1m50s

One Postgres with isolated identity/clinical databases and roles (ADR-003),
FastAPI /health, Streamlit placeholder, typed settings with offline defaults.

Refs #1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 14:46:01 +03:00
co-authored by Claude Opus 5.5
parent cf2cc8b5f4
commit 107b8dba51
32 changed files with 2252 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
# 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"
volumes:
pgdata: