diff --git a/README.md b/README.md index 0f75fbb3c36..2c19e93ffed 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ You can also [self-host](https://supabase.com/docs/guides/self-hosting) and [dev  - [PostgreSQL](https://www.postgresql.org/) is an object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance. -- [Realtime](https://github.com/supabase/realtime) is an Elixir server that allows you to listen to PostgreSQL inserts, updates, and deletes using websockets. Supabase listens to Postgres' built-in replication functionality, converts the replication byte stream into JSON, then broadcasts the JSON over websockets. +- [Realtime](https://github.com/supabase/realtime) is an Elixir server that allows you to listen to PostgreSQL inserts, updates, and deletes using websockets. Realtime polls Postgres' built-in replication functionality for database changes, converts changes to JSON, then broadcasts the JSON over websockets to authorized clients. - [PostgREST](http://postgrest.org/) is a web server that turns your PostgreSQL database directly into a RESTful API - [Storage](https://github.com/supabase/storage-api) provides a RESTful interface for managing Files stored in S3, using Postgres to manage permissions. - [postgres-meta](https://github.com/supabase/postgres-meta) is a RESTful API for managing your Postgres, allowing you to fetch tables, add roles, and run queries, etc. diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index ac54c922e0a..53f36bc21a0 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -87,7 +87,7 @@ services: realtime: container_name: supabase-realtime - image: supabase/realtime:v0.15.0 + image: supabase/realtime:v0.19.0 depends_on: - db restart: unless-stopped @@ -97,10 +97,17 @@ services: DB_NAME: postgres DB_USER: postgres DB_PASSWORD: ${POSTGRES_PASSWORD} - SLOT_NAME: supabase_realtime + DB_SSL: "false" PORT: 4000 - SECURE_CHANNELS: "true" JWT_SECRET: ${JWT_SECRET} + REPLICATION_MODE: RLS + REPLICATION_POLL_INTERVAL: 100 + SECURE_CHANNELS: "true" + SLOT_NAME: supabase_realtime_rls + TEMPORARY_SLOT: "true" + command: > + bash -c "./prod/rel/realtime/bin/realtime eval Realtime.Release.migrate + && ./prod/rel/realtime/bin/realtime start" storage: container_name: supabase-storage diff --git a/docker/volumes/db/init/00-initial-schema.sql b/docker/volumes/db/init/00-initial-schema.sql index f3e63542a92..81a2ed4fc40 100644 --- a/docker/volumes/db/init/00-initial-schema.sql +++ b/docker/volumes/db/init/00-initial-schema.sql @@ -1,4 +1,5 @@ --- Set up reatime +-- Set up realtime +create schema if not exists realtime; -- create publication supabase_realtime; -- defaults to empty publication create publication supabase_realtime; diff --git a/examples/nextjs-auth-tailwind/pages/index.js b/examples/nextjs-auth-tailwind/pages/index.js index abe68990d10..287a39a1cdb 100644 --- a/examples/nextjs-auth-tailwind/pages/index.js +++ b/examples/nextjs-auth-tailwind/pages/index.js @@ -15,7 +15,7 @@ const Index = () => {
Create a backend in less than 2 minutes. Start your project with a Postgres Database, - Authentication, instant APIs, realtime subscriptions and Storage. + Authentication, instant APIs, Realtime subscriptions and Storage.