18 lines
606 B
YAML
18 lines
606 B
YAML
services:
|
|
oral-trainer-api:
|
|
build:
|
|
context: ..
|
|
dockerfile: sentence_api/Dockerfile
|
|
restart: unless-stopped
|
|
network_mode: host
|
|
env_file:
|
|
- .env
|
|
command: ["python", "-m", "uvicorn", "sentence_api.main:app", "--host", "127.0.0.1", "--port", "8000", "--workers", "1", "--proxy-headers", "--forwarded-allow-ips", "*"]
|
|
volumes:
|
|
- ./data:/app/sentence_api/data
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/healthz', timeout=5)"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|