Skip to content

fix: bind docs server and preserve runtime port defaults - #107

Merged
9trocode merged 2 commits into
mainfrom
codex/fix-docs-host-binding
Jul 17, 2026
Merged

fix: bind docs server and preserve runtime port defaults#107
9trocode merged 2 commits into
mainfrom
codex/fix-docs-host-binding

Conversation

@9trocode

@9trocode 9trocode commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Root cause

Docusaurus defaults to localhost when --host is omitted, so Docker port publishing cannot reach the server. A subsequent direct main change added configurable HOST and PORT build args before FROM, but Docker does not expose those values inside the production stage unless they are redeclared. That produced commands such as docusaurus serve --host --port 8000 and the container exited.

Fix

  • declare ENV, PORT, and HOST build arguments inside the production stage
  • default to HOST=0.0.0.0 and PORT=8000
  • preserve PipeOps runtime overrides such as PORT=3000
  • quote both runtime values in the shell command

Verification

Reproduced before the fix:

  • original image logged http://localhost:8000/; Docker-published traffic failed
  • current main image exited with docusaurus serve --host --port 8000 when only PORT was provided

Verified after the fix:

  • Docker build succeeds without undefined-variable warnings
  • default runtime serves http://0.0.0.0:8000/ and returns HTTP 200
  • PORT=3000 serves http://0.0.0.0:3000/ and returns HTTP 200
  • Docusaurus production build completes successfully

@9trocode
9trocode merged commit 2292304 into main Jul 17, 2026
2 checks passed
@9trocode 9trocode changed the title fix: bind docs server to all interfaces fix: bind docs server and preserve runtime port defaults Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant