ReviewNB application is distributed as a docker image via Quay. Once your on-prem request is approved, we create a private docker image for your use & grant you access to it.
You can use deployment tool of your choice to run the docker image. Below, we show a simple way to run the docker image from command line.
Running docker image from the command line on a single instance works well for small to moderate installations. For larger deployments (>250 concurrent users) we recommend running ReviewNB in a cluster with container scheduling platforms such as Kubernetes, Docker compose, AWS ECS etc.
ReviewNB can pretty much run on any hardware. The only real requirement is to have at least 8GB of memory. Go higher on memory if your notebooks tend to be larger or you are expecting lot of concurrent users.
Run the image¶
Login (via docker CLI) to Quay docker registry with the credentials we sent you via email.
$ docker login -u="<username>" -p="<password>" quay.io
Pull the docker image. Image name & tag would also be available in the registration email we sent you.
$ docker pull quay.io/reviewnb/<your-company-name>:<reviewnb-version>
Run the docker image. Substitue all --env variables with your own values as explained in the table below this command.
$ docker run --detach \ --publish 443:8000 --publish 80:8000 \ --restart always \ --env GITHUB_APP_ID="1" \ --env GITHUB_CLIENT_ID="Iv1.5a6123881f61e84c" \ --env GITHUB_CLIENT_SECRET="2c40dbe73d8rdg3b7c37fbbab5d376b174b53deb" \ --env GITHUB_BASE_URL="https://github.corp.your-company-domain.com" \ --env GITHUB_APP_URL="https://ghes.nurtch.com/github-apps/reviewnb-for-nurtch" \ --env REVIEWNB_BASE_URL="https://reviewnb.nurtch.com" \ --env DB_URL="postgres://username:pwd@host:5432/database" \ --env GITHUB_APP_PEM="-----BEGIN RSA PRIVATE KEY-----\nMI<really-long-pem-key>Z9huMC\n-----END RSA PRIVATE KEY-----\n" \ quay.io/reviewnb/<your-company-name>:<reviewnb-version>
This will download the image, start a container and publish ports needed to access the application. The container will automatically restart after a system reboot.
Source for environment variables,
Endpoint at which your company’s GitHub enterprise instance is running
If you are using ReviewNB with github.com then use
||Endpoint at which your self hosted ReviewNB will be running|
||Create GitHub App|
Visit the endpoint where container is running (endpoint could even be an ip address for the sake of verification). You should see the login page without any errors on it. Do not login just yet, you can login after adding HTTPS suppport (last step below).
- If login page doesn’t show up or the page indicates any preflight errors, most likely you haven’t set all the environment variables properly.
- If all environment variables are set correctly and you’re still seeing errors, look at container logs (
docker logs <container-id>) to see if logs are complaining about something.
- If still not resolved, reach out to email@example.com
Domain Name & HTTPS Support¶
At this point, the application is simply running on port 80 and 443 on an instance. You should,
- Add a load balancer with HTTPS support in front of the instance. The exact steps depends on the infrastructure you are using. E.g. Create ALB for container running on AWS EC2
- Add a CNAME entry that points
REVIEWNB_BASE_URLto your load balancer. That way the application is accessible on easy to remeber endpoint (e.g. reviewnb.xyz-company.com)
Once the HTTPS support is added, you can set an additional environment variable
SSL_REDIRECT=1 to redirect all HTTP traffic to be served via secure HTTPS protocol.
Verify Bot Comments¶
You must perform this verification step to make sure all features are working as expected,
That’s all! You have succesfully installed and verified ReviewNB application & it’s ready for use.