DiscourseConnect のセットアップに問題があります。Traefik -> nginx[Discourse] リクエストはプレーンテキスト HTTP で送信されます(nginx は SSL をセットアップしていないため)。/etc/nginx/conf.d/discourse.conf の to preserve the proto, must be in http context というルールにより、Discourse(Rails アプリ)はプレーンテキスト HTTP リクエストを受信し、force_https が有効になっていても、/session/sso へのプレーンテキスト HTTP リダイレクトを返します。
run:
- exec: echo "Beginning of custom commands"
## If you want to set the 'From' email address for your first registration, uncomment and change:
## After getting the first signup email, re-comment the line. It only needs to run once.
# - exec: rails r "SiteSetting.notification_email='no-reply@forum.cabana.network'"
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: /# attempt to preserve the proto, must be in http context\nmap \$http_x_forwarded_proto \$thescheme {\n default \$scheme;\n "~https$" https;\n}/\n
to: |
# force https scheme so Discourse generates HTTPs links and redirects (ie, `/login`)
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: "$thescheme"
global: "true"
to: "https"
- exec: echo "End of custom commands"