Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Nginx config with outlets #913

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Use Nginx config with outlets #913

wants to merge 1 commit into from

Conversation

nbianca
Copy link
Member

@nbianca nbianca commented Jan 15, 2025

This config has several 'include' statements that serve as extension
outlets. Most of the "find & replace" instructions from templates
files have been replaced to use outlets.

This commit also deprecates IPv6 template in favour of an automatic
implementation that relies on container's connectivity.

@nbianca nbianca marked this pull request as draft January 17, 2025 16:12
@nbianca nbianca changed the title Add nginx config file and support for outlets Use new Nginx config with outlets Jan 17, 2025
@nbianca nbianca force-pushed the dev-nginx-conf branch 4 times, most recently from ca741a9 to 12299cc Compare January 22, 2025 19:33
@nbianca nbianca changed the title Use new Nginx config with outlets Use Nginx config with outlets Jan 22, 2025
@nbianca nbianca marked this pull request as ready for review January 22, 2025 19:34
Comment on lines +10 to +17
- file:
path: "/etc/nginx/conf.d/outlets/server/offline-page.conf"
contents: |
error_page 502 /error_page.html;
location /error_page.html {
root /var/www/discourse-offline-page/html;
internal;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to consider deployments that have Discourse pinned to the stable branch. The outlets will not be present until stable is bumped to include the new nginx configuration.

This config has several 'include' statements that serve as extension
outlets. Most of the "find & replace" instructions from templates
files have been replaced to use outlets.

This commit also deprecates IPv6 template in favour of an automatic
implementation that relies on container's connectivity.
filename: "/etc/nginx/conf.d/discourse.conf"
from: /listen 80;/
filename: "/etc/nginx/conf.d/outlets/server/http.conf"
from: /listen 80;(\nlisten \[::\]:80;)?/
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need to use a replace here? We could just overwrite the file.

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

Successfully merging this pull request may close these issues.

2 participants