Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ All notable changes to Bundle of Joy Server are documented here.
[`hyperpolymath/standards#100`](https://github.com/hyperpolymath/standards/issues/100),
[`#91`](https://github.com/hyperpolymath/standards/issues/91).

- **Container `APP_HOST` default is now `127.0.0.1`** (was: `"[::]"`
IPv6 all-interfaces). Tightens three sites that feed the Zig adapter
binary's `--host` flag: `stapeln.toml [targets.production]`,
`container/entrypoint.sh`, and `container/compose.prod.yaml`. Same
Phase E posture as the Cowboy bind change in the Elixir path: BoJ
binds loopback by default when fronted by `http-capability-gateway`
(HCG tier-2). Legacy/standalone deployments without HCG in front
should override `APP_HOST=0.0.0.0` (IPv4 all-interfaces) or
`APP_HOST=::` (IPv6 all-interfaces) in their deployment config.
Phase E rollout-runbook §1.4 prereq #7. Refs
[`hyperpolymath/standards#100`](https://github.com/hyperpolymath/standards/issues/100),
[`#91`](https://github.com/hyperpolymath/standards/issues/91).

### Added

- **ADR-0014 — cross-cartridge composition safety (RFC)** — frames the
Expand Down
8 changes: 6 additions & 2 deletions container/compose.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ services:
volumes:
- boj-node-data:/data:Z
environment:
# Server binding
APP_HOST: "[::]"
# Server binding — loopback by default per ADR-0004 §1 (BoJ is
# fronted by http-capability-gateway tier-2 and not externally
# routable). Override APP_HOST=0.0.0.0 or APP_HOST=:: for
# legacy/standalone deployments without HCG in front.
# See docs/integration/hcg-tier2-rollout-runbook.md §1.4 prereq #7.
APP_HOST: "127.0.0.1"
APP_PORT: "7700"
APP_DATA_DIR: "/data"
APP_LOG_FORMAT: "json"
Expand Down
8 changes: 6 additions & 2 deletions container/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ done
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${CART_LIBS}"

echo "Starting boj-server..."
echo " Host: ${APP_HOST:-[::]}"
echo " Host: ${APP_HOST:-127.0.0.1}"
echo " Port: ${APP_PORT:-7700}"
echo " Data: ${APP_DATA_DIR:-/data}"
echo " Log: ${APP_LOG_FORMAT:-json}"
Expand Down Expand Up @@ -137,4 +137,8 @@ bootstrap_federation &
# Replace the entrypoint shell with the application process so that
# signals are delivered directly and PID 1 is the application.

exec /app/boj-server serve --host "${APP_HOST:-[::]}" --port "${REST_PORT}"
# Default to 127.0.0.1 (loopback) per ADR-0004 §1 — BoJ is fronted by
# http-capability-gateway (HCG tier-2) and is not externally routable
# in canonical deployments. Override APP_HOST for legacy/standalone use.
# See docs/integration/hcg-tier2-rollout-runbook.md §1.4 prereq #7.
exec /app/boj-server serve --host "${APP_HOST:-127.0.0.1}" --port "${REST_PORT}"
9 changes: 8 additions & 1 deletion stapeln.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,14 @@ env = { LOG_LEVEL = "debug", BOJ_DEV_MODE = "true" }

[targets.production]
layers = ["runtime"]
env = { LOG_LEVEL = "info", APP_HOST = "[::]", APP_PORT = "7700" }
# APP_HOST = "127.0.0.1" (was "[::]") — code-enforces the ADR-0004 §1
# invariant that BoJ's back-side bind is not externally routable in
# deployments fronted by http-capability-gateway (HCG tier-2). See
# docs/integration/hcg-tier2-rollout-runbook.md §1.4 prereq #7.
# Legacy/standalone deployments without HCG in front should override
# APP_HOST=0.0.0.0 (IPv4 all-interfaces) or APP_HOST=:: (IPv6
# all-interfaces) in their deployment configuration.
env = { LOG_LEVEL = "info", APP_HOST = "127.0.0.1", APP_PORT = "7700" }

[targets.test]
layers = ["base", "zig-toolchain", "ffi-build", "adapter-build"]
Expand Down
Loading