fix(docker): override image healthcheck to the configured port
The ghcr.io llama.cpp image bakes in a HEALTHCHECK that curls port 8080 (the llama.cpp default). When the server runs on a different --port (here 8000), that check always fails and Docker reports the container as "unhealthy" even though it serves fine. Override the healthcheck in the docker run command to target the configured container_port/health_endpoint, with a 300s start-period so large-context model loads don't flap. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
a88c427ba9
commit
53b6849c27
2 changed files with 22 additions and 0 deletions
|
|
@ -126,6 +126,16 @@ def test_build_run_command_contains_key_flags():
|
|||
assert "--cont-batching" in cmd
|
||||
|
||||
|
||||
def test_build_run_command_overrides_healthcheck_to_configured_port():
|
||||
cfg = make_cfg()
|
||||
cmd = build_run_command(cfg)
|
||||
assert "--health-cmd" in cmd
|
||||
# healthcheck must target the configured container_port (8000), not the
|
||||
# image default (8080), and hit the configured health endpoint.
|
||||
assert "curl -f http://localhost:8000/health || exit 1" in cmd
|
||||
assert "--health-start-period" in cmd
|
||||
|
||||
|
||||
def test_build_run_command_expose_binds_all_interfaces():
|
||||
cfg = make_cfg(expose=True)
|
||||
cmd = build_run_command(cfg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue