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

Update supabase.yaml with variables that enable Supabase external OAu… #2162

Closed
wants to merge 1 commit into from

Conversation

gionatamettifogo
Copy link
Contributor

It is a little bit complicated to enable Github or Google external logins w/o understanding the details of how Coolify and docker compose work. I added some variables that hopefully will help people understand how to enable these providers.

Also, normally the application or service you write sits on an url which is different from the one used by Supabase. In that case the authentication breaks because Supabase GoTrue (the auth provider) was pointing GOTRUE_SITE_URL to the Supabase service instead of the customer's application. So I fixed that and explained a bit.

@andrasbacsai
Copy link
Member

Making - GOTRUE_SITE_URL=${GOTRUE_SITE_URL} instead of - GOTRUE_SITE_URL=${SERVICE_FQDN_SUPABASEKONG} makes the GOTRUE_SITE_URL to be empty by default.

Why it cannot be SERVICE_FQDN_SUPABASEKONG which is generated by Coolify?

@tonven
Copy link

tonven commented May 30, 2024

Making - GOTRUE_SITE_URL=${GOTRUE_SITE_URL} instead of - GOTRUE_SITE_URL=${SERVICE_FQDN_SUPABASEKONG} makes the GOTRUE_SITE_URL to be empty by default.

Why it cannot be SERVICE_FQDN_SUPABASEKONG which is generated by Coolify?

Correct we if I am wrong, but when you, for example, send password recovery from Supabase, GOTRUE_SITE_URL will be used as a redirect url that will be a part of recovery url. And in a case of SERVICE_FQDN_SUPABASEKONG it will just redirect to supabase instance instead of for example nextjs website. Maybe it is better to have something like this:

  • GOTRUE_SITE_URL=${GOTRUE_SITE_URL: SERVICE_FQDN_SUPABASEKONG}

Thank you.

@tonven
Copy link

tonven commented May 30, 2024

@andrasbacsai Also a question not related to variables, but more to supabase.
When I start stack again after first time I get exited state on minio createbucket with this in log: 086161794Z mc: Unable to make bucket supabase-minio/stub. Your previous request to create the named bucket succeeded and you already own it.

I guess it fails because it already created it and we need to check if it existed before creating. If yes, it should be healthy or excluded from healthcheck. I can try to create pr if you can suggest what should we do in this situation.

@andrasbacsai
Copy link
Member

@andrasbacsai Also a question not related to variables, but more to supabase. When I start stack again after first time I get exited state on minio createbucket with this in log: 086161794Z mc: Unable to make bucket supabase-minio/stub. Your previous request to create the named bucket succeeded and you already own it.

I guess it fails because it already created it and we need to check if it existed before creating. If yes, it should be healthy or excluded from healthcheck. I can try to create pr if you can suggest what should we do in this situation.

It has been solved in the latest template versions: 1a7894b

@andrasbacsai
Copy link
Member

Closing this until I got feedback for the original issue.

@tonven
Copy link

tonven commented Jun 4, 2024

@andrasbacsai Also a question not related to variables, but more to supabase. When I start stack again after first time I get exited state on minio createbucket with this in log: 086161794Z mc: Unable to make bucket supabase-minio/stub. Your previous request to create the named bucket succeeded and you already own it.
I guess it fails because it already created it and we need to check if it existed before creating. If yes, it should be healthy or excluded from healthcheck. I can try to create pr if you can suggest what should we do in this situation.

It has been solved in the latest template versions: 1a7894b

Thanks. I just tried to create a new version of supabase on latest version of coolify instance and --ignore-existing is not in docker compose file. Is there additional steps I need to do to get latest docker compose file or updating coolify should be enought? Thanks

@tonven
Copy link

tonven commented Jun 4, 2024

@andrasbacsai I see that a previous update for supabase also included update to templates/service-templates.json but not the one you referenced.

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.

None yet

3 participants