Closed maxboone closed 1 month ago
Main difference that "causes" this is that the base image doesn't use peer authentication for local executed commands, but rather trusts anything that comes from the unix domain.
Possible fix would be to add something in the entrypoint that appends the postgres
→ $POSTGRES_USER
mapping to pg_ident if $POSTGRES_USER != postgres
. I'd gladly write this and do a PR but not sure if opinions differ on that approach.
At this point we don't support configurable roles using the docker env vars
Supabase comes with pre-installed tables like auth.users, storage.objects etc with permissions created by migrations that assume the user's role is named postgres
and a handful of other roles used by specific services e.g. supabase_auth_admin
.
You can still create custom roles via the SQL layer/a migration as needed
Clear! Thanks @olirice :)
Bug report
Describe the bug
When a different username is passed using
POSTGRES_USER
the container will exit as the user doesn't exist:To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
Database & user are created with passed environment variables
Screenshots
NA
System information
NA
Additional context
NA