Harden container entrypoint for one-click deployments#60
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| load_config_file() { | ||
| if [ "${CONFIG_PATH:-}" = "" ]; then | ||
| return | ||
| fi | ||
|
|
||
| if [ ! -f "$CONFIG_PATH" ]; then | ||
| echo "[entrypoint] CONFIG_PATH set to '$CONFIG_PATH' but file not found" >&2 | ||
| log "CONFIG_PATH set to '$CONFIG_PATH' but file not found" | ||
| exit 1 | ||
| fi | ||
| echo "[entrypoint] loading configuration from $CONFIG_PATH" | ||
| set -a | ||
|
|
||
| log "loading configuration from $CONFIG_PATH" | ||
| # shellcheck disable=SC1090 | ||
| . "$CONFIG_PATH" | ||
| set +a | ||
| fi | ||
| } |
There was a problem hiding this comment.
Restore export of variables loaded via CONFIG_PATH
The new load_config_file function sources the file but no longer wraps it in set -a/set +a. Variables defined in a node.env file are therefore not exported to the child node process when the file is loaded via CONFIG_PATH. This regresses the documented one-click docker run flow where the env file holds values like RPC_URL, NODE_LABEL, contract addresses, etc.—they are visible to the shell for validation but disappear from process.env, causing the runtime to fall back to defaults or fail schema validation. The previous version exported these values, so configuration files now silently stop working. Reintroduce automatic exporting (or explicitly export required variables) before invoking the Node CLI.
Useful? React with 👍 / 👎.
Summary
containercommand while still supporting other CLI operationsnode.envtemplate, and expose service ports from the container imageTesting
Codex Task