From 29e3a3aff2209d43b89fead3788d8d5bcea4bcd7 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Sun, 26 Oct 2025 15:45:55 +0000 Subject: [PATCH] community: Rework acme redirect to latest discourse insanity --- .../templates/default/web_only.yml.erb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cookbooks/community/templates/default/web_only.yml.erb b/cookbooks/community/templates/default/web_only.yml.erb index 21bd5a7b9..a9d8288d0 100644 --- a/cookbooks/community/templates/default/web_only.yml.erb +++ b/cookbooks/community/templates/default/web_only.yml.erb @@ -1,6 +1,5 @@ templates: - "templates/web.template.yml" - - "templates/web.ipv6.template.yml" - "templates/web.ssl.template.yml" - "templates/enable-ruby-yjit.yml" @@ -97,8 +96,6 @@ volumes: host: /srv/community.openstreetmap.org/files/update-feeds.atom guest: /shared/feeds/update-feeds.atom -## Plugins go here -## see https://meta.discourse.org/t/19157 for details hooks: after_code: - exec: @@ -123,9 +120,12 @@ hooks: resolver <%= @resolvers.join(" ") %>; resolver_timeout 5s; ssl_dhparam /shared/ssl/dhparam.pem; - - replace: - filename: "/etc/nginx/conf.d/outlets/before-server/20-redirect-http-to-https.conf" - from: /listen 80;/ - to: | - listen 80; - rewrite ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 permanent; + +# hooks: and run: use own levels +run: + - replace: + filename: "/usr/local/bin/configure-ssl" + from: /listen 80;/ + to: | + listen 80; + rewrite ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 permanent; -- 2.39.5