Skip to content

Conversation

@alexbelgium
Copy link
Owner

Motivation

  • Replace the bundled nginx.conf with the upstream frontend nginx.conf so the add-on follows the source project's nginx layout and defaults.
  • Ensure single-container usage by rewriting internal proxy targets for the local service addresses when running as an add-on ingress.
  • Generate a dedicated ingress configuration at container startup that sets the ingress listening port/interface and includes ingress-specific parameters.
  • Bump the add-on version to reflect the configuration and build changes.

Description

  • Copy the upstream nginx.conf from the frontend build stage into the image at build time with COPY --from=frontend-builder /src/frontend/nginx.conf /etc/nginx/servers/nginx.conf in Dockerfile.
  • Restore upstream hostnames in the tracked rootfs/etc/nginx/servers/nginx.conf to use http://api and http://icecast (and http://api:5002/socket.io/) so the source file matches upstream.
  • Change startup logic in rootfs/etc/cont-init.d/32-nginx_ingress.sh to sed-rewrite proxy_pass http://api and proxy_pass http://icecast to proxy_pass http://127.0.0.1, duplicate nginx.conf to ingress.conf, update the listen directive to the ingress interface/port, and insert include /etc/nginx/includes/ingress_params.conf into the generated ingress config.
  • Populate ingress placeholders in ingress_params.conf by replacing %%ingress_entry%% and %%ingress_entry_modified%% at startup.
  • Bump version to "0.6.2" in config.yaml and update CHANGELOG.md to document the change.

Testing

  • No automated tests were executed as part of this change.

Codex Task

@alexbelgium alexbelgium merged commit 5bdcab6 into master Jan 29, 2026
6 of 7 checks passed
@alexbelgium alexbelgium deleted the codex/update-nginx.conf-installation-and-configurations branch January 29, 2026 16:43
Copy link

@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: 8e86e0b8e7

ℹ️ 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 on lines +22 to +26
cp /etc/nginx/servers/nginx.conf /etc/nginx/servers/ingress.conf
sed -i \
-e "s|listen 80;|listen ${ingress_interface}:${ingress_port} default_server;|g" \
-e "/index index.html;/a\\ include /etc/nginx/includes/ingress_params.conf;" \
/etc/nginx/servers/ingress.conf

Choose a reason for hiding this comment

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

P2 Badge Preserve ingress proxy params when regenerating config

The new ingress config is now built by copying nginx.conf and only injecting ingress_params.conf. This drops the previous include /etc/nginx/includes/proxy_params.conf; that lived in rootfs/etc/nginx/servers/ingress.conf, which sets proxy_read_timeout/proxy_send_timeout to 86400s. As a result, ingress traffic now inherits the upstream /api/ timeout of 300s from nginx.conf, so any long-running API call (for example a large database migration/import via ingress) will reliably time out after ~5 minutes. Consider re‑adding the proxy params include (or equivalent timeout settings) when generating ingress.conf so ingress behavior doesn’t regress from the previously configured long timeouts.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants