From bdd9bb1aa04eb3c8cb17d4740f77289d0a754353 Mon Sep 17 00:00:00 2001 From: saravanakumardb1 Date: Sat, 14 Feb 2026 13:41:15 -0800 Subject: [PATCH] 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 --- .env.example | 5 +++++ docker-compose.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/.env.example b/.env.example index 6badd470..f9c6c173 100644 --- a/.env.example +++ b/.env.example @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 1ce1428f..1a732cb1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: