feat: start nginx early to provide startup message#4421
feat: start nginx early to provide startup message#4421nijel merged 1 commit intoWeblateOrg:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds an “early nginx” phase during runserver startup so the container can serve a startup page/message before the full stack is ready.
Changes:
- Introduces early nginx start/stop helpers gated to the
webservice. - Refactors
collectstaticinto a reusable function and optionally runs it earlier. - Hooks stopping early nginx into the normal
runserver_mainpath.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77c2bef155
ℹ️ 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".
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: feb8137741
ℹ️ 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".
| sed "s#^pid /run/nginx.pid;\$#pid $EARLY_NGINX_PID_FILE;#" /etc/nginx/nginx.conf > "$EARLY_NGINX_CONF_FILE" | ||
|
|
||
| if ! grep -q "^pid $EARLY_NGINX_PID_FILE;\$" "$EARLY_NGINX_CONF_FILE"; then | ||
| echo "Failed to prepare early nginx configuration" | ||
| exit 1 |
There was a problem hiding this comment.
Avoid hard-failing on non-default nginx pid directive
prepare_early_nginx_main_config() assumes /etc/nginx/nginx.conf contains the exact literal pid /run/nginx.pid; and exits if that exact string is not rewritten. Any valid config variation (different pid path, extra whitespace, or a derived image that customizes nginx.conf) will make start_early_nginx abort runserver startup even though nginx itself could still run. This turns a cosmetic early-start feature into a hard startup regression for customized images.
Useful? React with 👍 / 👎.
No description provided.