Skip to content

feat: start nginx early to provide startup message#4421

Merged
nijel merged 1 commit intoWeblateOrg:mainfrom
nijel:early-nginx
Apr 11, 2026
Merged

feat: start nginx early to provide startup message#4421
nijel merged 1 commit intoWeblateOrg:mainfrom
nijel:early-nginx

Conversation

@nijel
Copy link
Copy Markdown
Member

@nijel nijel commented Apr 10, 2026

No description provided.

@nijel nijel self-assigned this Apr 10, 2026
@nijel nijel requested a review from Copilot April 10, 2026 16:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 web service.
  • Refactors collectstatic into a reusable function and optionally runs it earlier.
  • Hooks stopping early nginx into the normal runserver_main path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread start Outdated
Comment thread start
Comment thread start
Comment thread start Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread start Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread start Outdated
Comment thread start
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread start
Comment on lines +481 to +485
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@nijel nijel merged commit c6ae171 into WeblateOrg:main Apr 11, 2026
43 checks passed
@nijel nijel deleted the early-nginx branch April 11, 2026 07:32
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.

2 participants