tabbyAPI-ollama/docker/docker-compose.yml
TerminalMan 80198ca056
API: Add /v1/health endpoint (#178)
* Add healthcheck

- localhost only /healthcheck endpoint
- cURL healthcheck in docker compose file

* Update Healthcheck Response

- change endpoint to /health
- remove localhost restriction
- add docstring

* move healthcheck definition to top of the file

- make the healthcheck show up first in the openAPI spec

* Tree: Format
2024-08-27 21:37:41 -04:00

29 lines
770 B
YAML

version: '3.8'
services:
tabbyapi:
build:
context: ..
dockerfile: ./docker/Dockerfile
args:
- DO_PULL=true
ports:
- "5000:5000"
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:5000/health"]
interval: 30s
timeout: 10s
retries: 3
environment:
- NAME=TabbyAPI
- NVIDIA_VISIBLE_DEVICES=all
volumes:
- ./models:/app/models # Change me
# - /path/to/config.yml:/app/config.yml # Change me
# - /path/to/api_tokens.yml:/app/api_tokens.yml # Change me
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]