Hi there! i'm selfhosted supabase by docker. Docke...
# help
m
Hi there! i'm selfhosted supabase by docker. Docker always spams error
"supabase-realtime  | 2022-03-11 16:38:34.261 [error] Postgrex.Protocol (#PID<0.232.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (db:5432): non-existing domain - :nxdomain"
.
n
Hello @Mopsior! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Want to unsubscrie 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! Done using the thread? Click the button below to archive it.
s
The most common reason I've found for this is that the docker containers aren't on the same network. The default
bridge
network is what connects Docker to the outside, and Supabase has its own network. If they're on the same network, try assigning the hostname
db
to the postgres container and then restarting both realtime and postgres containers
m
How can i do that?
s
I install Portainer which lets me manage containers more easily (recommended), but there's a few alternative solutions at https://serverfault.com/questions/716719/how-do-i-change-docker-host-name-after-the-image-creation
m
so when i install it in portainer it will works?
If yes, thanks you ❤️
@User did i need to do more?
(pls ping me on answer)
s
Inside the postgres container settings, go to the bottom of the page and choose the network tab. Hostname should be
db
. If that doesn't work, try
supabase-db
@User
If you've already got the stack running, you don't need to create another stack, as that will result in having 2 copies of every container and will cause problems
m
i'm new in portainer and i dont know how to create it
i'm dont have any stack
i deleted it...
do i need to create new docker-compose and edit this here?
I can't find it in supabase-db (postgres) settings
what network i will use?
im finded what i must change
but... i cant change
I changed it
but....
still this same error
Eh, someone can help me???
s
How are you setting up your docker containers?
m
i'm nothing changed
on clear machine
s
You haven’t outlined how you are creating your containers. Is there a guide you are following?
m
yeah, official supabase docker guide
did u know something?
I'm do this same on two machines, this same D:
s
I’ll have to test this out to see the results I get, I normally run the local copy using the Supabase cli so haven’t seen this error before
m
Supabase CLI?
I don't know it existit. I'm using this tutorial for docker
s
I've now set this up and I'm not running into the issue you are having. Was there anything specific that you did to get that error?
m
Em... Nothing. I'm just created it with this tutorial. Now i will test disable firewall and create it full via portianer
s
Can we stick to one issue at a time in this thread? I've now run the docker-compose on a separate system and still can't duplicate the issue you are having. Is there a docker desktop on Linux? if yes can you check how many containers running postgres you have going.
m
It's ubuntu server, so i dont have UI (if u thinking about this). On docker container ls / docker-compose ls nothing is running (without portainer)
Oh, i'm created stack by pasting docker-compose.yml and env.... and it's working! 🥳
n
Thread was archived by . Anyone can send a message to unarchive it.
m
oh... still not working
supabase-db
logs
s
I will have to try spinning up a ubuntu server to see if I can replicate your issue
m
okay
It's stack (type web editor) docker-compose.yml and env from github
Supabase-realtime logs
supabase-rest logs
supabase-auth logs
This same in supabase-meta
supabase-kong
This same in supabase-storage
in supabase-studio no errors, only start info
Copy code
> studio@0.0.9 start /usr/src/app

> next start

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Loaded env from /usr/src/app/.env
j
I’m having the exact same problem. According to someone from supabase. the issue is there is no db-connection. I don’t know why that is, or how to do connect the db yet.