Replies: 1 comment 1 reply
-
|
Hi @DaavidGG I've had a similar problem and found this workaround (this is by no means the actual solution but maybe it can help you or others as well). The issueThe problem seems to be that the default
The workaround
That did it for me, hope it can help you as well. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have self-hosted Supabase with Docker on Oracle Cloud, and when I try to listen for changes in real time, I get the following error.
I have tried removing the RLS policies from the tables, but that does not work either.
This is my Docker Compose configuration for realtime.
realtime:
container_name: realtime-dev.supabase-realtime
image: supabase/realtime
restart: unless-stopped
ports:
- "4000:4000"
networks:
- supabase_network
depends_on:
db:
condition: service_healthy
analytics:
condition: service_healthy
healthcheck:
test:
[
"CMD",
"curl",
"-sSfL",
"--head",
"-o",
"/dev/null",
"-H",
"Authorization: Bearer ${ANON_KEY}",
"http://localhost:4000/api/tenants/realtime-dev/health"
]
timeout: 15s
interval: 15s
retries: 3
environment:
PORT: 4000
DB_HOST: ${POSTGRES_HOST}
DB_PORT: ${POSTGRES_PORT}
DB_USER: supabase_admin
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_NAME: ${POSTGRES_DB}
DB_AFTER_CONNECT_QUERY: 'SET search_path TO _realtime'
DB_ENC_KEY: supabaserealtime
API_JWT_SECRET: ${JWT_SECRET}
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
ERL_AFLAGS: -proto_dist inet_tcp
DNS_NODES: "''"
RLIMIT_NOFILE: 10000
APP_NAME: realtime
RUN_JANITOR: true
JANITOR_INTERVAL: 60000
LOG_LEVEL: "info"
SEED_SELF_HOST: true
command: >
sh -c "/app/bin/migrate && /app/bin/realtime eval 'Realtime.Release.seeds(Realtime.Repo)' && /app/bin/server"
This is my Kong.yml:
Secure Realtime routes
_comment: 'Realtime: /realtime/v1/websocket -> ws://realtime:4000/socket/websocket'
url: http://realtime:4000/socket/websocket
routes:
strip_path: true
paths:
protocols:
plugins:
config:
origins:
- "*"
methods:
- GET
- POST
- OPTIONS
headers:
- Authorization
- apikey
- Content-Type
- Accept
- Origin
credentials: true
max_age: 3600
config:
add:
headers:
- "Connection:Upgrade"
- "Upgrade:websocket"
remove:
querystring:
- apikey
_comment: 'Realtime: /realtime/v1/* -> ws://realtime:4000/socket/*'
url: http://realtime:4000/api
protocol: http
routes:
strip_path: true
paths:
plugins:
config:
hide_credentials: false
config:
hide_groups_header: true
allow:
- admin
- anon
Can anyone help me with this problem?
Beta Was this translation helpful? Give feedback.
All reactions