Self-Hosting

Full Development Docker Compose

This Docker Compose is intended for running a full development environment for Rivet.


Prerequisites

  • Docker
  • Docker Compose

Required ports

The following ports need to be open before running Rivet:

ServiceDescriptionOptionalPort
Rivet ServerAPI8080
Object Storage9000
Rivet GuardHTTP7080
HTTPS7443
TCP & UDPX7500-7599
Rivet ClientHost NetworkingX7600-7699

Operation

Start

Start the cluster with:

docker compose -f docker/dev-full/docker-compose.yml up -d
Command Line

This will start the cluster in detached mode. Once complete, visit the dashboard at http://localhost:8080.

To test creating an actor end-to-end, run:

./scripts/manual_tests/actors_e2e_js.ts
Command Line

You should see an actor in the actor list in the dashboard.

Stop

To shut down the Rivet cluster, run:

docker compose -f docker/dev-full/docker-compose.yml down
Command Line

When you start the cluster again, your data will still be there.

Nuke from orbit

To destroy all containers & volumes immediately, run:

docker compose -f docker/dev-full/docker-compose.yml down -v -t 0
Command Line

Development

Rebuilding

To rebuild all services, run:

docker compose -f docker/dev-full/docker-compose.yml up -d --build
Command Line

To rebuild just the server, run:

docker compose -f docker/dev-full/docker-compose.yml up -d --build rivet-server
Command Line

Logs

To fetch logs for a service, run:

docker compose -f docker/dev-full/docker-compose.yml logs {name}
Command Line

Following

To follow logs, run:

docker compose -f docker/dev-full/docker-compose.yml logs -f {name}
Command Line

Grep

It's common to use grep (or the more modern ripgrep) to filter logs.

For example, to find all errors in rivet-server with the 10 preceding lines, run:

docker compose -f docker/dev-full/docker-compose.yml logs rivet-server | grep -B 10 level=error
Command Line

Logs for rivet-server and rivet-client can also be configured via the environment. See here for more information.


Caveats

The docker compose currently only supports host networking and host ports.

Read more about host networking and ports here.


Troubleshooting

Have you tried turning it off and on again?

If something gets really screwed up, you can destroy the entire cluster with:

docker compose -f docker/dev-full/docker-compose.yml down -v -t 0
Command Line

This will destroy all containers & volumes immediately.