feat(extraction): add extraction-service to docker-compose + .env.example

- docker-compose.yml: extraction-service on port 4005 with Traefik, Loki, healthcheck
- .env.example: PYTHON_SIDECAR_URL, DEFAULT_MODEL_ID, GEMINI_API_KEY
This commit is contained in:
saravanakumardb1 2026-02-14 13:41:15 -08:00
parent 38467a9b96
commit bdd9bb1aa0
2 changed files with 33 additions and 0 deletions

View File

@ -20,5 +20,10 @@ STRIPE_WEBHOOK_SECRET=whsec_...
STRIPE_PRICE_PRO=price_...
STRIPE_PRICE_ENTERPRISE=price_...
# ── Extraction Service (port 4005 + Python sidecar 4006) ─────
PYTHON_SIDECAR_URL=http://localhost:4006
DEFAULT_MODEL_ID=gemini-2.5-flash
GEMINI_API_KEY=your-gemini-api-key
# ── Product Identity ──────────────────────────────────────────
DEFAULT_PRODUCT_ID=lysnrai

View File

@ -172,6 +172,34 @@ services:
timeout: 10s
retries: 3
# ── Extraction Service (Fastify + TypeScript + Python sidecar) ──
extraction-service:
build:
context: .
dockerfile: services/extraction-service/Dockerfile
ports:
- '4005:4005'
env_file:
- .env
environment:
- PORT=4005
- PYTHON_SIDECAR_URL=http://localhost:4006
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.extraction.rule=PathPrefix(`/api/extract`) || PathPrefix(`/api/tasks`)'
- 'traefik.http.services.extraction.loadbalancer.server.port=4005'
logging:
driver: loki
options:
loki-url: 'http://host.docker.internal:3100/loki/api/v1/push'
loki-retries: '3'
restart: unless-stopped
healthcheck:
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:4005/health']
interval: 30s
timeout: 10s
retries: 3
# ── Volumes ───────────────────────────────────────────────────────
volumes:
loki-data: