coolify: [Bug]: Realtime in Supabase is not working - Coolify overrides a required container_name in docker-compose.yml

Description

When using realtime in Supabase, the Kong-Container receives the request from the client and tries to connect to realtime-dev.supabase-realtime but cannot resolve this. I can see in the docker-compose-file that there is the correct “container_name” under the realtime-section:

  realtime-dev:
    image: 'supabase/realtime:v2.28.23'
    container_name: realtime-dev.supabase-realtime

But when switching to the “show deployable docker compose” view, this is tranformed to:

  realtime-dev:
    image: 'supabase/realtime:v2.28.23'
    container_name: realtime-dev-q4s4w4k

Maybe the underlying problem is the format of “realtime-dev.supabase-realtime” (with the dot inbetween) and Coolify strips off everything after that dot when transforming? Or coolify checks if the service-name is string-included in the container_name and then uses the former. I don’t know - probably something obvious to spot.

Anyway, here is the Kong log when trying to access realtime features via web socket:

2024/04/24 10:25:46 [error] 1193#0: *65269 [lua] init.lua:310: execute(): DNS resolution failed: dns server error: 3 name error. Tried: ["(short)realtime-dev.supabase-realtime:(na) - cache-miss","realtime-dev.supabase-realtime:1 - cache-hit/dns server error: 3 name error","realtime-dev.supabase-realtime:5 - cache-hit/dns server error: 3 name error"], client: 172.18.0.21, server: kong, request: "GET /realtime/v1/websocket?apikey=<...>&vsn=1.0.0 HTTP/1.1",

So, I believe when Coolify overrides the container-name, the name that kong expects (realtime-dev.supabase-realtime) to handle/proxx the realtime connections does not exist anymore.

Minimal Reproduction (if possible, example repository)

Install Supabase from Server Enable Realtime on any table and subscribe to the table from a client connected to that supabase instance

Exception or Error

Browser will show failed websocket connections, kong will show resolve errors:

2024/04/24 10:25:46 [error] 1193#0: *65269 [lua] init.lua:310: execute(): DNS resolution failed: dns server error: 3 name error. Tried: ["(short)realtime-dev.supabase-realtime:(na) - cache-miss","realtime-dev.supabase-realtime:1 - cache-hit/dns server error: 3 name error","realtime-dev.supabase-realtime:5 - cache-hit/dns server error: 3 name error"], client: 172.18.0.21, server: kong, request: "GET /realtime/v1/websocket?apikey=<...>&vsn=1.0.0 HTTP/1.1",

Version

v4.0.0-beta.265

About this issue

  • Original URL
  • State: open
  • Created 2 months ago
  • Reactions: 4
  • Comments: 18 (7 by maintainers)

Most upvoted comments

@actraiser pretty sure i just deployed the latest supabase yaml https://raw.githubusercontent.com/coollabsio/coolify/main/templates/compose/supabase.yaml

i also updated my environment variable

SERVICE_FQDN_SUPABASE_8000=https://supabase.dotabod.com

do you have the version from 2 weeks ago? i’m on v265 beta