chore: Remove obsolete build and GUI files, and introduce a new Docker Compose setup for microservices architecture. This change streamlines the project structure by eliminating legacy scripts and integrating a PostgreSQL database service alongside extraction and cleaning services.
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
services:
|
||||
database:
|
||||
image: postgres:16-alpine
|
||||
container_name: ipsextractor-db
|
||||
environment:
|
||||
POSTGRES_DB: ipsextractor
|
||||
POSTGRES_USER: ipsextractor
|
||||
POSTGRES_PASSWORD: ipsextractor
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- ipsextractor_db:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ipsextractor -d ipsextractor"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
extraction:
|
||||
build:
|
||||
context: ./services/extraction
|
||||
dockerfile: Dockerfile
|
||||
container_name: ipsextractor-extraction
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DATABASE_URL: postgresql+psycopg://ipsextractor:ipsextractor@database:5432/ipsextractor
|
||||
EXTRACTOR_PROVIDER: ${EXTRACTOR_PROVIDER:-}
|
||||
EXTRACTOR_BASE_URL: ${EXTRACTOR_BASE_URL:-}
|
||||
EXTRACTOR_API_KEY: ${EXTRACTOR_API_KEY:-}
|
||||
EXTRACTOR_MODEL: ${EXTRACTOR_MODEL:-}
|
||||
NORMALIZER_PROVIDER: ${NORMALIZER_PROVIDER:-}
|
||||
NORMALIZER_BASE_URL: ${NORMALIZER_BASE_URL:-}
|
||||
NORMALIZER_API_KEY: ${NORMALIZER_API_KEY:-}
|
||||
NORMALIZER_MODEL: ${NORMALIZER_MODEL:-}
|
||||
NORMALIZER_TIMEOUT_S: ${NORMALIZER_TIMEOUT_S:-0}
|
||||
EXTRACTOR_TIMEOUT_S: ${EXTRACTOR_TIMEOUT_S:-120}
|
||||
PDF_DPI: ${PDF_DPI:-600}
|
||||
PDF_THREAD_COUNT: ${PDF_THREAD_COUNT:-10}
|
||||
POPPLER_PATH: ${POPPLER_PATH:-}
|
||||
CONCURRENCY_LIMIT: ${CONCURRENCY_LIMIT:-4}
|
||||
ALLOWED_DOCUMENT_TYPES: ${ALLOWED_DOCUMENT_TYPES:-CC,TI,CE,RC,PA,PPT,PEP,EPT,NUIP}
|
||||
ports:
|
||||
- "8001:8001"
|
||||
volumes:
|
||||
- ${IPS_DOCUMENT_ROOT:-./data}:/data
|
||||
|
||||
cleaning:
|
||||
build:
|
||||
context: ./services/cleaning
|
||||
dockerfile: Dockerfile
|
||||
container_name: ipsextractor-cleaning
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DATABASE_URL: postgresql+psycopg://ipsextractor:ipsextractor@database:5432/ipsextractor
|
||||
ports:
|
||||
- "8002:8002"
|
||||
|
||||
api_gateway:
|
||||
build:
|
||||
context: ./services/api_gateway
|
||||
dockerfile: Dockerfile
|
||||
container_name: ipsextractor-api
|
||||
depends_on:
|
||||
- extraction
|
||||
- cleaning
|
||||
environment:
|
||||
EXTRACTION_URL: http://extraction:8001
|
||||
CLEANING_URL: http://cleaning:8002
|
||||
ports:
|
||||
- "8000:8000"
|
||||
|
||||
volumes:
|
||||
ipsextractor_db:
|
||||
Reference in New Issue
Block a user