29 lines
974 B
YAML
29 lines
974 B
YAML
services:
|
|
extractors:
|
|
build:
|
|
context: ..
|
|
dockerfile: deploy/Dockerfile
|
|
image: extractors:${EXTRACTORS_TAG}
|
|
container_name: extractors
|
|
restart: unless-stopped
|
|
environment:
|
|
EXTRACTORS_HOST: "0.0.0.0"
|
|
EXTRACTORS_PORT: "${EXTRACTORS_PORT}"
|
|
EXTRACTORS_MAX_UPLOAD_MB: "${EXTRACTORS_MAX_UPLOAD_MB}"
|
|
# Optional, only needed by sentiment/NER/OCR (added later):
|
|
EXTRACTORS_LLM_GATEWAY_URL: "${EXTRACTORS_LLM_GATEWAY_URL:-}"
|
|
EXTRACTORS_LLM_MODEL: "${EXTRACTORS_LLM_MODEL:-qwen3.5}"
|
|
ports:
|
|
- "${EXTRACTORS_PORT}:${EXTRACTORS_PORT}"
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request,os,sys; sys.exit(0 if urllib.request.urlopen(f'http://127.0.0.1:{os.getenv(\"EXTRACTORS_PORT\")}/health',timeout=3).status==200 else 1)"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
networks:
|
|
- didi-network
|
|
|
|
networks:
|
|
didi-network:
|
|
external: true
|