Livrare LOT 1 - Didi
This commit is contained in:
commit
5380c3fc63
990 changed files with 133308 additions and 0 deletions
41
ai_platform/modules/extractors/deploy/deploy.sh
Normal file
41
ai_platform/modules/extractors/deploy/deploy.sh
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env bash
|
||||
# Deploy the extractors service. Fail-fast on missing config (no silent defaults).
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
[[ -f .env ]] && source .env
|
||||
|
||||
check_required_var() {
|
||||
if [[ -z "${!1:-}" ]]; then
|
||||
echo "ERROR: $1 not set (see .env.example)" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: $0 {up|down|logs|build|test}
|
||||
|
||||
Required env vars (set in .env):
|
||||
EXTRACTORS_TAG Image tag (e.g. 0.1.0)
|
||||
EXTRACTORS_PORT Host/container port (e.g. 54400 dev / 14400 prod)
|
||||
EXTRACTORS_MAX_UPLOAD_MB Max upload size in MB (e.g. 100)
|
||||
|
||||
Optional:
|
||||
EXTRACTORS_LLM_GATEWAY_URL LLM gateway base URL (sentiment/NER/OCR only)
|
||||
EXTRACTORS_LLM_MODEL Model alias (default: qwen3.5)
|
||||
EOF
|
||||
}
|
||||
|
||||
check_required_var "EXTRACTORS_TAG"
|
||||
check_required_var "EXTRACTORS_PORT"
|
||||
check_required_var "EXTRACTORS_MAX_UPLOAD_MB"
|
||||
|
||||
case "${1:-}" in
|
||||
up) docker compose up -d --build ;;
|
||||
down) docker compose down ;;
|
||||
logs) docker compose logs -f ;;
|
||||
build) docker compose build ;;
|
||||
test) docker build -f deploy/Dockerfile --target builder -t extractors-test .. ;;
|
||||
*) usage; exit 1 ;;
|
||||
esac
|
||||
Loading…
Add table
Add a link
Reference in a new issue