33 lines
957 B
YAML
33 lines
957 B
YAML
# ── llm-api service (Rust GGUF inference) ──
|
|
# Model file is mounted from host; healthcheck tolerates HTTP 404 (exit 22)
|
|
# from curl to confirm the server is alive regardless of endpoint availability.
|
|
|
|
services:
|
|
llm-api:
|
|
container_name: llm-api
|
|
image: ghcr.io/asepharyana/asepharyana-hub/llm-api:latest
|
|
restart: always
|
|
networks:
|
|
app-shared-net:
|
|
aliases:
|
|
- llm-api
|
|
volumes:
|
|
- /root/models/gguf:/root/models/gguf:ro
|
|
environment:
|
|
- MODEL_PATH=/root/models/gguf/MiniCPM-V-4.6-Q4_K_M.gguf
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'curl -so /dev/null --connect-timeout 5 http://localhost:8080/health || test $? -eq 22']
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 30s
|
|
labels:
|
|
prometheus.io/scrape: "true"
|
|
prometheus.io/port: "8080"
|
|
prometheus.io/path: "/metrics"
|
|
|
|
networks:
|
|
app-shared-net:
|
|
name: app-shared-net
|
|
external: true
|