Symptoms (any of):
- A magic link or password reset mail in Mailpit (
http://localhost:54324) looks nothing like
supabase/templates/*.mustache: no DropNext styling, and the link points at
http://127.0.0.1:54321/auth/v1/verify?token=… instead of the app's /auth-return.
- The auth container's log repeats
templatemailer_template_body_http_error ... /email/magic_link.mustache: status code 403
(docker logs $(docker ps -q --filter ancestor=public.ecr.aws/supabase/gotrue:v2.195.0), adjust the tag).
Root cause: the CLI bind-mounts the template files into the Kong container and GoTrue fetches
them from Kong on every send. The mount carries no :z relabel, so on a host with SELinux
enforcing (the repo's files are labelled mnt_t when the checkout lives on its own mount) Kong
gets "Permission denied" on files that are world-readable, answers 403, and GoTrue silently
falls back to its built-in templates. Nothing fails loudly, the mail is just a different mail.
Workaroud: relabel the template files so containers may read them (reversible with restorecon):
chcon -t container_file_t supabase/templates/*.mustache
Bug report
This should not be so hard. I think the mounts should carry a :z label so this gets easier.
Symptoms (any of):
http://localhost:54324) looks nothing likesupabase/templates/*.mustache: no DropNext styling, and the link points athttp://127.0.0.1:54321/auth/v1/verify?token=…instead of the app's/auth-return.templatemailer_template_body_http_error ... /email/magic_link.mustache: status code 403(
docker logs $(docker ps -q --filter ancestor=public.ecr.aws/supabase/gotrue:v2.195.0), adjust the tag).Root cause: the CLI bind-mounts the template files into the Kong container and GoTrue fetches
them from Kong on every send. The mount carries no
:zrelabel, so on a host with SELinuxenforcing (the repo's files are labelled
mnt_twhen the checkout lives on its own mount) Konggets "Permission denied" on files that are world-readable, answers 403, and GoTrue silently
falls back to its built-in templates. Nothing fails loudly, the mail is just a different mail.
Workaroud: relabel the template files so containers may read them (reversible with
restorecon):chcon -t container_file_t supabase/templates/*.mustacheBug report
This should not be so hard. I think the mounts should carry a
:zlabel so this gets easier.