Closed almereyda closed 3 weeks ago
Thanks @almereyda , i originally thought that this is something that we could have fixed by modifying the migration script on our end, just realized that this is being hard coded on supabase-auth side as well.
Will need some time to figure out how we can patch this on our patched-gotrue service (not sure if it is actually possible). Otherwise monkey patching is probably our only solution.
Actually, perhaps the suggestion that you proposed in https://github.com/AppFlowy-IO/AppFlowy-Cloud/issues/823#issuecomment-2380247083 will work. Will investigate this.
Yes, it's this line in the above example:
sed 's/postgres/supabase_auth_admin/g' -i migrations/20240612123726_enable_rls_update_grants.up.sql
Fixed in appflowyinc/gotrue:0.6.48
.
Describe the bug
The Supabase Auth / gotrue migration https://github.com/supabase/auth/blob/master/migrations/20240612123726_enable_rls_update_grants.up.sql hard codes a
postgres
role, which is non-existent on Postgres containers which set thePOSTGRES_USER
variable.To Reproduce
Steps used to reproduce the behavior in with #622:
docker compose pull
docker compose rm -sf
docker compose build
docker compose up -d
docker compose logs gotrue
Expected behavior
All migrations run.
Evidence
Workaround
A monkey patched workaround with using a static user name (and not environmental variable substitution) with the mentioned Compose setup reads the following:
Together with
in the
gotrue
service of the Compose manifest, this allows us to run the migration successfully:This could eventually be upstreamed to supabase/auth, asking for parametrisation with an environmental variable.