Afternoon all <a:peepohey:876875490101702677> Lovi...
# help
x
Afternoon all Loving Supabase so far, though I've hit a potential snag with the local development setup. After much Googling, YouTube "tutorial" watching and head scratching I stumbled across https://github.com/supabase/supabase/issues/4440#issuecomment-1073853032 which revealed that the "Storage" menu option in Studio not being available with local
supabase start
is deliberate and not a bug as I first though. > but it should still work 100% through the API I don't know what this means. I've tried to create a dummy page to create a bucket called
avatars
, with the intention of then removing that code and implementing the actual functionality for updating/reading from that bucket. I get an RLS error. I cannot configure the RLS settings for Storage because Storage is not in my Studio, so I can't access "Storage > Policies" to configure it. Catch 22. Seems impossible to use locally? My question is this, can we currently only develop applications that need to use Storage by connecting directly to the cloud Studio? If not, and there is a way to use the Storage API locally, I would very much appreciate any pointers! Thanks in advance.
n
Hello @xephyr! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
g
Supabase I think agrees storage should get added to studio, but that has not been done yet. You can use the sql editor to set your policies in the meantime.
n
xephyr (2022-04-22)
x
Ah okay, I'm a front-end dev so part of the appeal of Supabase is the back-end as a service and the client so I don't have to learn SQL 😅
How about creating buckets, my method of dummying
createBucket()
in a page load and then deleting the code is okay? Since neither Studio nor CLI can create a bucket it seems like the only option
(I couldn't get it to work, but I found another thread in here that mentioned using the
service_key
with the query to force it through so I'll try that, even if it feels unsafe)
g
Any reason you have to use the local implementation for development or kicking the tires? A free hosted tier has all the storage stuff in the dashboard.
x
The hosted tier is for production, right?
To develop new features, quickly switch branches, etc it's always local
g
Well all your code is local, but the supabase instance and studio/dashboard are the cloud version. Your code would interface to them the same (other than URL) local or remote. You can have a dev instance and a production instance later, or even go back to local later for dev. Really your preference. I've never used a local install myself.
x
That... is a good point that hadn't even occurred to me haha
Strange as I had planned to create a 2nd instance that my Vercel preview instances would use
Alright I may as well try that and switch back to local once that gets more features 🙂
g
I think it also gives you a better feel on real world latencies/performance etc.
x
Does render my first day of figuring out scripts to
pg_dump
before
supabase stop
and
psql
after
supabase start
somewhat redundant 😅
Indeed it does, well thanks for this
How would that work for committing local migrations? When both the current dev env and prod envs are both remotes?
I guess just setup package scripts to toggle between remotes with
supabase db remote set
and then
supabase db remote commit
g
Yeah you have to do a similar thing if you want to upgrade between major versions of postgres (at the moment) when they occur.
x
Alright well this all makes sense
Thanks for talking it through 👍