From f226f31fee3ca4f0638bd1cadc7396798e962480 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 7 Jun 2026 19:02:17 +0200 Subject: [PATCH] refactor(infra): remove nlp-service from docker-compose files --- docker-compose.prod.yml | 36 ------------------------------------ docker-compose.yml | 39 --------------------------------------- 2 files changed, 75 deletions(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 9a328b36..26e07442 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -200,39 +200,6 @@ services: security_opt: - no-new-privileges:true - # --- NLP service: rule-based NL query parser --- - # Lightweight FastAPI service; replaces Ollama for smart search query parsing. - # Connects to the DB at startup to build person/tag lookup tables. - nlp-service: - build: - context: ./nlp-service - restart: unless-stopped - expose: - - "8001" - networks: - - archiv-net - environment: - DATABASE_URL: "postgresql://archiv:${POSTGRES_PASSWORD}@db:5432/archiv" - NLP_FUZZY_THRESHOLD: "${NLP_FUZZY_THRESHOLD:-80}" - mem_limit: 256m - memswap_limit: 256m - read_only: true - tmpfs: - - /tmp:size=32m - cap_drop: - - ALL - security_opt: - - no-new-privileges:true - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8001/health"] - interval: 10s - timeout: 5s - retries: 5 - start_period: 15s - depends_on: - db: - condition: service_healthy - backend: image: familienarchiv/backend:${TAG:-nightly} build: @@ -251,8 +218,6 @@ services: # is a one-shot that must complete successfully. See #510. create-buckets: condition: service_completed_successfully - nlp-service: - condition: service_healthy # Bound to localhost only — Caddy fronts external traffic. ports: - "127.0.0.1:${PORT_BACKEND}:8080" @@ -287,7 +252,6 @@ services: APP_ADMIN_PASSWORD: ${APP_ADMIN_PASSWORD} APP_OCR_BASE_URL: http://ocr-service:8000 APP_OCR_TRAINING_TOKEN: ${OCR_TRAINING_TOKEN} - APP_NLP_BASE_URL: http://nlp-service:8001 MAIL_HOST: ${MAIL_HOST} MAIL_PORT: ${MAIL_PORT:-587} MAIL_USERNAME: ${MAIL_USERNAME:-} diff --git a/docker-compose.yml b/docker-compose.yml index 4de4245d..74f1bd3e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -141,42 +141,6 @@ services: security_opt: - no-new-privileges:true - # --- NLP service: rule-based NL query parser --- - # FastAPI Python service; replaces Ollama for smart search query parsing. - # Not started in CI — CI uses explicit service selection - # (docker-compose.ci.yml: db minio create-buckets) - nlp-service: - build: - context: ./nlp-service - dockerfile: Dockerfile - container_name: archive-nlp - restart: unless-stopped - expose: - - "8001" - networks: - - archiv-net - environment: - DATABASE_URL: "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}" - NLP_FUZZY_THRESHOLD: "${NLP_FUZZY_THRESHOLD:-80}" - mem_limit: 256m - memswap_limit: 256m - read_only: true - tmpfs: - - /tmp:size=32m - cap_drop: - - ALL - security_opt: - - no-new-privileges:true - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8001/health"] - interval: 10s - timeout: 5s - retries: 5 - start_period: 15s - depends_on: - db: - condition: service_healthy - # --- Backend: Spring Boot --- backend: build: @@ -195,8 +159,6 @@ services: condition: service_started ocr-service: condition: service_started - nlp-service: - condition: service_healthy environment: SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/${POSTGRES_DB} SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER} @@ -222,7 +184,6 @@ services: SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE: ${MAIL_STARTTLS_ENABLE:-false} APP_OCR_BASE_URL: http://ocr-service:8000 APP_OCR_TRAINING_TOKEN: "${OCR_TRAINING_TOKEN:-}" - APP_NLP_BASE_URL: "http://nlp-service:8001" SENTRY_DSN: ${SENTRY_DSN:-} SENTRY_TRACES_SAMPLE_RATE: ${SENTRY_TRACES_SAMPLE_RATE:-1.0} # Observability: send traces to Tempo inside archiv-net (OTLP gRPC port 4317)