-
Notifications
You must be signed in to change notification settings - Fork 295
Description
Feature request
Is your feature request related to a problem? Please describe.
So I'm working on a project where I'm using codespaces for an ephemeral development environment, but this could equally apply to gitpod as well.
One of the issues I'm coming up against is that when I make a new codespace/container, I need to manually create a new .env.local
file with the anon and service_role keys. This is not major, but it would be super nice to be able to start work without this step.
Describe the solution you'd like
I was thinking there could be a option flag on supabase start
like supabase start --value-file
and perhaps some config in supabase/config.toml
like
[value_file]
path = "./.env.local"
file_type = "env"
anon_key = "NEXT_PUBLIC_SUPABASE_ANON_KEY"
service_role_key = "SUPABASE_SERVICE_ROLE_KEY"
api_url = "NEXT_PUBLIC_SUPABASE_URL"
Which would create the correct file based on the path, file_type and mappings. In this case a .env.local
file at the projects root.
Describe alternatives you've considered
Another solution could be creating environment variables directly however that would not be as flexible and would still need the mappings.
Another solution could be to provide the values to use like
supabase start --anon-key="sknsdjkbnhn" --service-role-key="cndjkskcnsdjkn"