refactor(infra): remove nlp-service from docker-compose files

This commit is contained in:
Marcel
2026-06-07 19:02:17 +02:00
committed by marcel
parent a8a5130b02
commit f226f31fee
2 changed files with 0 additions and 75 deletions

View File

@@ -200,39 +200,6 @@ services:
security_opt: security_opt:
- no-new-privileges:true - 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: backend:
image: familienarchiv/backend:${TAG:-nightly} image: familienarchiv/backend:${TAG:-nightly}
build: build:
@@ -251,8 +218,6 @@ services:
# is a one-shot that must complete successfully. See #510. # is a one-shot that must complete successfully. See #510.
create-buckets: create-buckets:
condition: service_completed_successfully condition: service_completed_successfully
nlp-service:
condition: service_healthy
# Bound to localhost only — Caddy fronts external traffic. # Bound to localhost only — Caddy fronts external traffic.
ports: ports:
- "127.0.0.1:${PORT_BACKEND}:8080" - "127.0.0.1:${PORT_BACKEND}:8080"
@@ -287,7 +252,6 @@ services:
APP_ADMIN_PASSWORD: ${APP_ADMIN_PASSWORD} APP_ADMIN_PASSWORD: ${APP_ADMIN_PASSWORD}
APP_OCR_BASE_URL: http://ocr-service:8000 APP_OCR_BASE_URL: http://ocr-service:8000
APP_OCR_TRAINING_TOKEN: ${OCR_TRAINING_TOKEN} APP_OCR_TRAINING_TOKEN: ${OCR_TRAINING_TOKEN}
APP_NLP_BASE_URL: http://nlp-service:8001
MAIL_HOST: ${MAIL_HOST} MAIL_HOST: ${MAIL_HOST}
MAIL_PORT: ${MAIL_PORT:-587} MAIL_PORT: ${MAIL_PORT:-587}
MAIL_USERNAME: ${MAIL_USERNAME:-} MAIL_USERNAME: ${MAIL_USERNAME:-}

View File

@@ -141,42 +141,6 @@ services:
security_opt: security_opt:
- no-new-privileges:true - 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: Spring Boot ---
backend: backend:
build: build:
@@ -195,8 +159,6 @@ services:
condition: service_started condition: service_started
ocr-service: ocr-service:
condition: service_started condition: service_started
nlp-service:
condition: service_healthy
environment: environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/${POSTGRES_DB} SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/${POSTGRES_DB}
SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER} SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER}
@@ -222,7 +184,6 @@ services:
SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE: ${MAIL_STARTTLS_ENABLE:-false} SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE: ${MAIL_STARTTLS_ENABLE:-false}
APP_OCR_BASE_URL: http://ocr-service:8000 APP_OCR_BASE_URL: http://ocr-service:8000
APP_OCR_TRAINING_TOKEN: "${OCR_TRAINING_TOKEN:-}" APP_OCR_TRAINING_TOKEN: "${OCR_TRAINING_TOKEN:-}"
APP_NLP_BASE_URL: "http://nlp-service:8001"
SENTRY_DSN: ${SENTRY_DSN:-} SENTRY_DSN: ${SENTRY_DSN:-}
SENTRY_TRACES_SAMPLE_RATE: ${SENTRY_TRACES_SAMPLE_RATE:-1.0} SENTRY_TRACES_SAMPLE_RATE: ${SENTRY_TRACES_SAMPLE_RATE:-1.0}
# Observability: send traces to Tempo inside archiv-net (OTLP gRPC port 4317) # Observability: send traces to Tempo inside archiv-net (OTLP gRPC port 4317)