Version: Next

Docker

Make sure you have Docker installed.

Quick Install

The image is available in Docker Hub under the name supabase/realtime.

You can use the docker-compose file in this repository as a starting point. Note that this already includes a Postgres database image, so you don't have to set one up yourself.

Fill up the environment variables as appropriate, and then run the image:

docker-compose up

Build from Scratch

Build the image:

docker build --tag foo .

Run the image:

# Update the environment variables to point to your own database
docker run --rm \
-e DB_HOST=host.docker.internal \
-e DB_NAME=postgres \
-e DB_USER=postgres \
-e DB_PASSWORD=postgres \
-e DB_PORT=5432 \
-e PORT=4000 \
-e HOSTNAME=localhost \
-e SECRET_KEY_BASE=SOMETHING_SUPER_SECRET \
-p 4000:4000 \
foo