https://blog.cpbprojects.me/how-to-self-host-supab...
# reading
c
https://blog.cpbprojects.me/how-to-self-host-supabase-a-complete-guide I wrote a blog post about how to self-host Supabase
m
Hey, what about decoupling the database?
c
thanks for asking, the funny thing is that this is what I wasn't able to figure it out
I tried to spin up another postgres db, and input the credentials in the .env file
but I was unable to get it to work
My guess would be normally the db part of the docker initialize the db, but decoupled db needs to be set up
at last, since I was able to connect to the dockered db anyways, I gave up
n
I also tried to decouple the database with a postgre server managed on digitalocean, it's really a hassle.
m
do you wanna maybe take a session sometime, like 30 mins, and try to figure out this stuff together?
yeah so there is this issue on docker database losing its data after the stack restarts, its not persistent, a lot of discussions are open about it
im not sure about hosting the database itself on the server, the best practice would be to have it dockerized but either in a different compose file or something else
yeah
c
hmm, I'm thinking maybe after supabase has generated the db on the docker db, we can call a postgresql backup function, get that sql file, and run it in another postgres db, and see if this works
n
I would ideally like to use digitalocean's self-managed database
but you have to run the following migrations: https://github.com/supabase/postgres/tree/develop/migrations
I have errors everywhere, and digitalocean does not allow to create super users on posgre..
m
hey nix
@NiX
if you wanna hop on a call or something to see what can we do, i got a bit of time now
i would make a replication service or something, although i think its already built into postgres
idk never used pg before
c
i've learnt from somewhere that we can do postgres backup, and it creates a sql script that, when run, creates the exact same db
3 Views