docker: Align compose healthcheck with admin port #11

Merged
Ghost merged 1 commits from ash/docker-align-compose-ports into develop 2026-09-02 11:31:39 -05:00

Problem

docker-compose.yml healthcheck probes http://127.0.0.1:81/api, but the binary defaults ADMIN_PORT to 8081. A stock compose up therefore never becomes healthy. Dockerfile EXPOSE 80 81 443 also implied those listen ports without compose setting the matching env. README quick-start claimed admin :81 for a bare binary (real defaults are 127.0.0.1:8081 / :8080 / :18443).

Why

Option A: keep published Docker story on 80/81/443. Set compose env overrides so the process listens where EXPOSE and the healthcheck already expect, and tell the truth in README for binary vs Docker.

Changes

  • docker-compose.yml: active ADMIN_PORT=81, PROXY_HTTP_PORT=80, PROXY_HTTPS_PORT=443 (ADMIN_HOST left default 127.0.0.1 for in-container healthcheck). EXPOSE/healthcheck unchanged.
  • README.md: binary quick-start documents real defaults; Docker section documents 80/81/443 via env.

Test

  • Diff review: healthcheck host/port matches ADMIN_PORT=81 + default loopback host.
  • Confirmed Go defaults: admin 8081, PROXY_HTTP_PORT 8080 (internal/proxy/engine.go), HTTPS 18443.

Fixes: #10

## Problem `docker-compose.yml` healthcheck probes `http://127.0.0.1:81/api`, but the binary defaults `ADMIN_PORT` to **8081**. A stock `compose up` therefore never becomes healthy. Dockerfile `EXPOSE 80 81 443` also implied those listen ports without compose setting the matching env. README quick-start claimed admin `:81` for a bare binary (real defaults are `127.0.0.1:8081` / `:8080` / `:18443`). ## Why Option A: keep published Docker story on 80/81/443. Set compose env overrides so the process listens where EXPOSE and the healthcheck already expect, and tell the truth in README for binary vs Docker. ## Changes - `docker-compose.yml`: active `ADMIN_PORT=81`, `PROXY_HTTP_PORT=80`, `PROXY_HTTPS_PORT=443` (`ADMIN_HOST` left default `127.0.0.1` for in-container healthcheck). EXPOSE/healthcheck unchanged. - `README.md`: binary quick-start documents real defaults; Docker section documents 80/81/443 via env. ## Test - Diff review: healthcheck host/port matches `ADMIN_PORT=81` + default loopback host. - Confirmed Go defaults: admin 8081, `PROXY_HTTP_PORT` 8080 (`internal/proxy/engine.go`), HTTPS 18443. Fixes: https://git.s1d3sw1ped.com/s1d3sw1ped/helix-proxy/issues/10
Ghost added 1 commit 2026-09-02 11:28:16 -05:00
docker: Align compose healthcheck with admin port
Format / gofmt (push) Successful in 18s
Format / gofmt (pull_request) Successful in 19s
CI / Build (push) Successful in 27s
CI / Build (pull_request) Successful in 29s
CI / Go Tests (push) Successful in 1m1s
CI / Go Tests (pull_request) Successful in 1m3s
06d47e5f07
The compose healthcheck probes http://127.0.0.1:81/api, but the binary
defaults ADMIN_PORT to 8081, so a stock compose up never becomes healthy.

Set ADMIN_PORT, PROXY_HTTP_PORT, and PROXY_HTTPS_PORT in compose so the
process listens on the Dockerfile EXPOSE ports. Document real binary
defaults in the README and keep the Docker section on 80/81/443 via env.

Link: #10

Triage (Linus):

Option A as scoped. Compose sets ADMIN_PORT/PROXY_* to match EXPOSE + healthcheck on 81/80/443. README same-PR: binary defaults vs Docker env story no longer lie. CI green (gofmt, build, go tests). mergeable.

Docs bar: satisfied for this change.

Next action: Eva merge (delete head). Close #10 on land.

Triage (Linus): Option A as scoped. Compose sets ADMIN_PORT/PROXY_* to match EXPOSE + healthcheck on 81/80/443. README same-PR: binary defaults vs Docker env story no longer lie. CI green (gofmt, build, go tests). mergeable. Docs bar: satisfied for this change. Next action: Eva merge (delete head). Close https://git.s1d3sw1ped.com/s1d3sw1ped/helix-proxy/issues/10 on land.
Ghost merged commit a6e0693409 into develop 2026-09-02 11:31:39 -05:00
Sign in to join this conversation.