Hobby deployment guide.
Before we get started, you should install Go (1.21), Node.js (18+), and yarn (1+). You should have the latest version of Docker (25.0+) with the docker compose plugin (2.24+) and Git (2.13+) installed. We suggest configuring docker to use at least 8GB of RAM, 4 CPUs, and 64 GB of disk space.
$ go version
go version go1.21.6 linux/arm64
$ node --version
v18.15.0
$ yarn --version
4.0.2
$ docker --version
Docker version 25.0.3, build 4debf41
$ docker compose version
Docker Compose version v2.24.5
Clone the highlight.io repository and make sure to checkout the submodules with the --recurse-submodules
flag.
git clone --recurse-submodules https://github.com/highlight/highlight
If this hobby deploy is running on a remote server, make changes to the docker/.env
file for your deployment. Hosting the frontend on a different port is possible by modifying docker/compose.hobby.yml
port forwarding. Update the following values to your backend IP address.
REACT_APP_PRIVATE_GRAPH_URI=http://your-ip-address:8082/private
REACT_APP_PUBLIC_GRAPH_URI=http://your-ip-address:8082/public
REACT_APP_FRONTEND_URI=http://your-ip-address
The frontend for hobby deploy now defaults to using password auth. That uses a password set in your deployments docker/.env file to authenticate users
. Update the following environment variable to your preferred admin password.
ADMIN_PASSWORD=YOUR_ADMIN_PASSWORD
By default, the stack deploys the frontend and backend over HTTP without SSL. If you need SSL, update the certificates in backend/localhostssl
and set the SSL
environment variable to true
in docker/.env
.
# if you do not have a server.pem file, run the following command to convert the crt file to a pem.
openssl x509 -in server.crt -out server.pem -outform PEM
# set the following environment variable in docker/.env
SSL=true
In the highlight/docker
directory, run ./run-hobby.sh
to start the docker stack.
cd highlight/docker;
./run-hobby.sh;
Visit your REACT_APP_FRONTEND_URI to view the dashboard and go through the login flow; use the password set in docker/.env variable ADMIN_PASSWORD
with any valid email address.
In your frontend application, you should setup highlight.io as usual (see our guides), with the exception of adding the backendUrl
flag to your init()
method. See the example in react to the right.
import { H } from 'highlight.run';
H.init('<YOUR_PROJECT_ID>', {
backendUrl: 'http://localhost:8082/public',
...
});
Having issues? Here's some things to try. First run the docker ps
command and ensure that all containers are in a 'healthy' state. As a second step, run docker compose logs
to see the logs for the infra containers. Looking at the logs, if any containers are not healthy, use the follow commands to start from scratch. If this doesn't help with troubleshooting, please reach out.
docker ps
docker compose logs
# delete everything in the docker compose stack
docker compose down --remove-orphans --volumes --rmi local