FastAPI orchestrator (health/sources/estimates/orders/jobs per docs/04), adaptive router (compliant methods only, no bypass tiers), pipeline (sourcing->extraction->structuring/dedup->fusion->QA with per-field provenance, drops < confidence target), live connectors GLEIF/Brreg/Companies House (PRH/CVR/Bolagsverket gated to level-0 until terms verified). sources.yaml registry. infra/docker-compose + Caddyfile for the VPS. FlareSolverr/stealth/proxy/fake-account paths intentionally NOT carried over (CLAUDE.md §1). py_compile clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
70 lines
1.8 KiB
YAML
70 lines
1.8 KiB
YAML
# 0pt — always-on services for a single small VPS (docs/08). Vercel hosts the
|
|
# Next.js frontend; this compose runs the data engine + DB + embeds + proxy.
|
|
services:
|
|
postgres:
|
|
image: pgvector/pgvector:pg16
|
|
environment:
|
|
POSTGRES_USER: opt
|
|
POSTGRES_PASSWORD: ${PG_PASSWORD}
|
|
POSTGRES_DB: opt
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
- ../sql:/docker-entrypoint-initdb.d:ro
|
|
restart: unless-stopped
|
|
|
|
redis:
|
|
image: redis:7
|
|
restart: unless-stopped
|
|
|
|
api:
|
|
build: ../services/api
|
|
command: uvicorn orchestrator.main:app --host 0.0.0.0 --port 8000
|
|
environment:
|
|
DATABASE_URL: postgres://opt:${PG_PASSWORD}@postgres:5432/opt
|
|
COMPANIES_HOUSE_API_KEY: ${COMPANIES_HOUSE_API_KEY:-}
|
|
INTERNAL_TOKEN: ${INTERNAL_TOKEN}
|
|
depends_on: [postgres, redis]
|
|
restart: unless-stopped
|
|
|
|
worker:
|
|
build: ../services/api
|
|
command: python -m workers.run
|
|
environment:
|
|
DATABASE_URL: postgres://opt:${PG_PASSWORD}@postgres:5432/opt
|
|
COMPANIES_HOUSE_API_KEY: ${COMPANIES_HOUSE_API_KEY:-}
|
|
depends_on: [postgres, redis]
|
|
restart: unless-stopped
|
|
|
|
nocodb:
|
|
image: nocodb/nocodb:latest
|
|
environment:
|
|
NC_DB: "pg://postgres:5432?u=opt&p=${PG_PASSWORD}&d=opt"
|
|
NC_PUBLIC_URL: "https://data.0pt.app"
|
|
depends_on: [postgres]
|
|
restart: unless-stopped
|
|
|
|
metabase:
|
|
image: metabase/metabase:latest
|
|
environment:
|
|
MB_DB_TYPE: postgres
|
|
MB_DB_HOST: postgres
|
|
MB_DB_PORT: "5432"
|
|
MB_DB_USER: opt
|
|
MB_DB_PASS: ${PG_PASSWORD}
|
|
MB_DB_DBNAME: opt
|
|
depends_on: [postgres]
|
|
restart: unless-stopped
|
|
|
|
caddy:
|
|
image: caddy:2
|
|
ports: ["80:80", "443:443"]
|
|
volumes:
|
|
- ./Caddyfile:/etc/caddy/Caddyfile
|
|
- caddydata:/data
|
|
depends_on: [api, nocodb, metabase]
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
pgdata: {}
|
|
caddydata: {}
|