Reputation: 3070
I've done a fresh install of Supabase via docker compose following this example into my Ubuntu 20.04 server. When I run docker-compose up everything works except I see this error in my logs:
supabase-rest | 21/Feb/2022:19:50:29 +0000: {"details":"could not translate host name \"l@db\" to address: Name does not resolve\n","code":"","message":"Database connection error. Retrying the connection."}
How do I fix this?
Upvotes: 1
Views: 4702
Reputation: 2127
Looking at this section in the docker-compose.yml:
rest:
container_name: supabase-rest
image: postgrest/postgrest:v9.0.0
depends_on:
- db
restart: unless-stopped
environment:
PGRST_DB_URI: postgres://postgres:${POSTGRES_PASSWORD}@db:5432/postgres
It's possible that the password you used in .env
is not being escaped correctly - does it contain special chars?
Note that they need to be URI encoded if so as per: How to handle special characters in the password of a Postgresql URL connection string?
Upvotes: 1