Deploy Relay
Relay provides DStack peer with @dstack-js/transport
compatible signaling server written with multi-tenancy support using redis
Public Relay
Public relay has multi-regional and blue-green deploy to provide as higher as possible SLA and latencies
It is accesible here: https://relay.dstack.dev
You can check status and uptime here: https://status.dstack.dev
Docker is only maintained way to run relay
Pulling image
You can check for fresh tag here.
docker pull ghcr.io/dstack-js/dstack/relay:main
Verify signature (optional)
Install cosign
curl -O https://dstack.dev/cosign.pub
cosign verify --key cosign.pub ghcr.io/dstack-js/dstack/relay:main
Configuration
HOST
You can specify a host to listen on using HOST
environment key
It defaults to 0.0.0.0
PORT
You can specify a port to listen on using PORT
environment key
It defaults to 13579
REDIS_URL
Relay depends on redis, you can specify an url using REDIS_URL
environment key
Using docker-compose
Here is an sample compose file:
version: '3.8'
services:
relay:
image: ghcr.io/dstack-js/dstack/relay:main
ports:
- 13579:13579
depends_on:
- redis
environment:
REDIS_URL: "redis://redis:6379"
redis:
image: redis:latest
ports:
- 6379:6379
Here is an example setup:
cd
mkdir relay && cd relay
curl -o docker-compose.yaml https://dstack.dev/docker-compose.relay.yaml
docker-compose up -d
Using Heroku
You will need an redis addon, and you will need to set environment values like specified in configuration
- Clone repo:
git clone https://github.com/dstack-js/dstack.git && cd dstack
- Build relay:
yarn build
- Deploy using Heroku CLI:
cd dist/packages/relay
heroku create
heroku addons:create heroku-redis:hobby-dev -a <application-name>
heroku container:login
heroku container:push web -a <application-name>
heroku container:release web -a <application-name>
heroku open -a <application-name>