-
Notifications
You must be signed in to change notification settings - Fork 747
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
10 changed files
with
97 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
# This file is deprecated; you can remove it from your app.yml | ||
# TODO(2026-01-01): Remove this file | ||
run: | ||
- exec: |- | ||
echo "Deprecation warning: sshd is no longer supported" | ||
echo "Remove templates/sshd.template.yml from your containers/*.yml files" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
# This file is deprecated; you can remove it from your app.yml | ||
# TODO(2026-01-01): Remove this file | ||
run: | ||
- exec: echo "Enabling IPv6 listener" | ||
- replace: | ||
filename: "/etc/nginx/conf.d/discourse.conf" | ||
from: listen 80; | ||
to: | | ||
listen 80; | ||
listen [::]:80; | ||
- exec: |- | ||
echo "Deprecation warning: IPv6 is enabled by default when possible" | ||
echo "Remove templates/web.ipv6.template.yml from your containers/*.yml files" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,51 @@ | ||
run: | ||
- exec: | ||
cmd: | ||
- "mkdir -p /shared/ssl/" | ||
- replace: | ||
filename: "/etc/nginx/conf.d/discourse.conf" | ||
from: /server.+{/ | ||
to: | | ||
server { | ||
listen 80; | ||
return 301 https://$$ENV_DISCOURSE_HOSTNAME$request_uri; | ||
} | ||
server { | ||
- replace: | ||
filename: "/etc/nginx/conf.d/discourse.conf" | ||
from: /listen 80;\s+gzip on;/m | ||
to: | | ||
listen 443 ssl; | ||
http2 on; | ||
SSL_TEMPLATE_SSL_BLOCK | ||
- replace: | ||
filename: "/etc/nginx/conf.d/discourse.conf" | ||
from: /listen 80;\s+listen \[::\]:80;\s+gzip on;/m | ||
to: | | ||
listen 443 ssl; | ||
listen [::]:443 ssl; | ||
http2 on; | ||
SSL_TEMPLATE_SSL_BLOCK | ||
- replace: | ||
hook: ssl | ||
filename: "/etc/nginx/conf.d/discourse.conf" | ||
from: /SSL_TEMPLATE_SSL_BLOCK/ | ||
to: | | ||
ssl_protocols TLSv1.2 TLSv1.3; | ||
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; | ||
ssl_prefer_server_ciphers off; | ||
ssl_certificate /shared/ssl/ssl.crt; | ||
ssl_certificate_key /shared/ssl/ssl.key; | ||
ssl_session_tickets off; | ||
ssl_session_timeout 1d; | ||
ssl_session_cache shared:SSL:1m; | ||
gzip on; | ||
add_header Strict-Transport-Security 'max-age=31536000'; # remember the certificate for a year and automatically connect to HTTPS for this domain | ||
if ($http_host != $$ENV_DISCOURSE_HOSTNAME) { | ||
rewrite (.*) https://$$ENV_DISCOURSE_HOSTNAME$1 permanent; | ||
} | ||
- replace: | ||
filename: "/etc/nginx/conf.d/discourse.conf" | ||
from: "location @discourse {" | ||
to: | | ||
location @discourse { | ||
add_header Strict-Transport-Security 'max-age=31536000'; # remember the certificate for a year and automatically connect to HTTPS for this domain | ||
cmd: | ||
- "mkdir -p /shared/ssl/" | ||
|
||
- file: | ||
path: "/etc/nginx/conf.d/outlets/before-server/redirect-http-to-https.conf" | ||
contents: | | ||
server { | ||
listen 80; | ||
return 301 https://$$ENV_DISCOURSE_HOSTNAME$request_uri; | ||
} | ||
- exec: rm /etc/nginx/conf.d/outlets/server/http.conf | ||
|
||
- file: | ||
hook: ssl | ||
path: "/etc/nginx/conf.d/outlets/server/https.conf" | ||
contents: | | ||
listen 443 ssl; | ||
http2 on; | ||
ssl_protocols TLSv1.2 TLSv1.3; | ||
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; | ||
ssl_prefer_server_ciphers off; | ||
ssl_certificate /shared/ssl/ssl.crt; | ||
ssl_certificate_key /shared/ssl/ssl.key; | ||
ssl_session_tickets off; | ||
ssl_session_timeout 1d; | ||
ssl_session_cache shared:SSL:1m; | ||
add_header Strict-Transport-Security 'max-age=31536000'; | ||
if ($http_host != $$ENV_DISCOURSE_HOSTNAME) { | ||
rewrite (.*) https://$$ENV_DISCOURSE_HOSTNAME$1 permanent; | ||
} | ||
- file: | ||
path: "/etc/nginx/conf.d/outlets/discourse/https.conf" | ||
contents: | | ||
add_header Strict-Transport-Security 'max-age=31536000'; | ||
- exec: | ||
cmd: | ||
- |- | ||
if [ -f "/proc/net/if_inet6" ] ; then | ||
sed -i 's/listen 80;/listen 80;\nlisten [::]:80;/g' /etc/nginx/conf.d/outlets/before-server/redirect-http-to-https.conf | ||
sed -i 's/listen 443 ssl;/listen 443 ssl;\nlisten [::]:443 ssl;/g' /etc/nginx/conf.d/outlets/server/https.conf | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters