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

fix: Adjusted the existing Supabase service image to allow redirect links in emails to follow the SITE_URL… #4696

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

Conversation

justserdar
Copy link

… custimisation via SITE_URL env. Fix provided by Fiend & Darren, solution fix reproduced and tested by hum+.

Issues

Redirect links in Supabase e-mail is based on the SERVICE_FQDN_SUPABASEKONG, this can be wrong at times, this modification takes in the SITE_URL for the e-mail links.

Changes & Fix

  • supabase-db:
    ports:
    - "5432:5432" # Addition
  • Changed FQDN_SUPABASE_URL=${FQDN_SUPABASE_URL} to GOTRUE_SITE_URL=${SITE_URL}

… custimisation via SITE_URL env. Fix provided by Fiend & Darren, solution fix reproduced and tested by hum+.
@djsisson
Copy link
Contributor

@justserdar please remove mapping ports to host, this should not be the default, it will break if it is already in use.

Generally mapping ports to the host should generally not be used, there are much more secure options to do this.

@justserdar
Copy link
Author

@djsisson I understood this fixes parts of supabase that doesn't work. I can remove the ports but then what would be the actual fix?

@djsisson
Copy link
Contributor

@justserdar the fix should be to make the publicly available option work for supabase, but if a user wants to expose their db to the host, then they can manually alter the compose file themselves.
As i said it is terrible security practice to even do this.

@Geczy
Copy link
Contributor

Geczy commented Dec 31, 2024

@justserdar the fix should be to make the publicly available option work for supabase, but if a user wants to expose their db to the host, then they can manually alter the compose file themselves. As i said it is terrible security practice to even do this.

what are the more secure methods to do this?

@justserdar
Copy link
Author

justserdar commented Dec 31, 2024

@djsisson I got this feedback from a community member called Fiend on discord. He told me you offered this solution for his supabase setup in a support thread. However if it's not advised (exposing ports), any advice going forward?

I'll change the PR after I tested a new solution.

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

Successfully merging this pull request may close these issues.

3 participants