-
Notifications
You must be signed in to change notification settings - Fork 4
Productionize LiveReview
You can follow the article for Demo Mode and make sure the software is running first in your target server.
When you run lrops.sh status you should something like as follows:
The next task is to turn on the production mode.
Run lrops.sh set-mode prod and enter "y" to continue:
You should see success message:
Run lrops.sh show-mode to confirm:
The goal now is to:
- Point
yourdomain.comorlivereview.yourdomain.comto your production server - Get a reverse proxy to handle requests
- Pass the requests correctly to our docker containers
- Make sure SSL (https) works correctly
This can be achieved in many ways. For reverse proxy you can use nginx, caddy, apache or any other tool of your choice.
The first task is to setup an A record in your DNS manager such as Namecheap, GoDaddy or AWS Route 53, etc
so that yourdomain.com or livereview.yourdomain.com routes traffic to your server's public IP A.B.C.D.
For example, in hexmos.com case - you can see the namecheap configuration as follows:
You can use DNS Propagation Checker or dig command to validate this.
It looks like this in our case - you can still a few locations still waiting to get propagated:
Run lrops.sh help nginx or lrops.sh help caddy or lrops.sh help apache to get reverse proxy-specific
instructions on how to route this traffic to the containers.
High level instructions for nginx are as follows:
1. Install Nginx:
sudo apt update && sudo apt install nginx
2. Copy the LiveReview Nginx template:
sudo cp ~/livereview/config/nginx.conf.example /etc/nginx/sites-available/livereview
3. Edit the domain name:
sudo sed -i 's/your-domain.com/your-actual-domain.org/g' /etc/nginx/sites-available/livereview
4. Enable the site:
sudo ln -s /etc/nginx/sites-available/livereview /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
At this point - you can actually visit the URL to get the http (insecure) version of the app:
Finally - you will need SSL certificates to secure the configuration. You can do lrops.sh help ssl to get
some guidance. Usually you can use let's encrypt to get a certificate for free
using their certbot command. You can also probably get it via Cloudflare or your organization's administrators
can help you get a certificate.
Here are general guidance on getting SSL certificate and configuring:
OPTION 1: Automatic SSL with Caddy (Recommended for new setups)
- Handles certificates automatically
- Zero manual certificate management
- See: lrops.sh help caddy
OPTION 2: Manual SSL with existing reverse proxy
- Use your existing nginx/apache setup
- Obtain certificates with certbot or your preferred method
- Configure your reverse proxy to use certificates
OPTION 3: Cloud/managed SSL
- Use CloudFlare, AWS ALB, or similar services
- Terminate SSL at the load balancer/CDN level
- Point to your LiveReview ports (8888/8081)
REQUIREMENTS FOR ALL APPROACHES:
- Domain pointing to your server (DNS setup)
- Ports 80 and 443 accessible
- LiveReview running on ports 8888 (API) and 8081 (UI)
REVERSE PROXY ROUTING:
Route /api/* → http://127.0.0.1:8888
Route /* → http://127.0.0.1:8081
GENERAL SSL GUIDANCE:
- Let's Encrypt is free and widely supported
- Use certbot for most manual SSL setups
- Configure automatic certificate renewal
- Test your SSL setup: https://www.ssllabs.com/ssltest/
In my particular case, I had to the following:
Get the certificate only:
sudo certbot certonly -d livereview.hexmos.com
Once the certificate was ready, I opened up the configuration file:
vim /etc/nginx/sites-enabled/livereview
# deleted the http-only block, uncommented the https block (there's already a template)
nginx -t # returned OK, no syntax errors
sudo systemctl restart nginx
This is a pretty standard thing to do for setting up any website or webapp. If you are facing any issues in your particular circumstance in getting this to work - just Create an Issue and our team will help you out.
The result of this step is that you can open https://yourdomain.com or https://livereview.yourdomain.com to
get the login screen for LiveReview. And when you look at the URL bar - you can see that there is a valid SSL
certificate protecting transactions with the service.
I did a hard reload for https://livereview.hexmos.com in my browser, and I got the app as expected:
In production, if you try to add a Git connector, it'll ask you to configure a domain URL first:
The reason for this is - because we want to configure how platforms such as Gitlab/Github/Bitbucket can send webhooks/notifications to our server.
You can Goto Settings -> Instance. There usually the path will be pre-filled via the address bar. If not you can type it out and hit "Save":
Now if you come back to Git connectors, you will have the buttons visible and the warnings will be gone:
You can follow Add Git Providers page if you haven't already to add at least 1 git connector to your LiveReview.
You should have at least 1 connector like this in the "Your Connectors" section; click the "Cog" icon to see settings for that connector
You'll see the "Repository Access" section:
Here, we have three categories possible:
- Not connected: It means - the only way to trigger a review is by using LiveReview's web UI with "New Review"
- Manual Trigger: You can assign a reviewer in the Gitlab/Github/BitBucket MR pages and LiveReview will pick it up and post review comments.
- Automatic: LiveReview will automatically trigger a review when it is opened or a change is posted to it. As of now, this feature is not implemented yet.
To enable manual trigger, if it is not already enabled, just click on "Enable Manual Trigger for All Projects"
In the panel below - you can see project level progress:
You can trigger a review now by assigning a reviewer in the code host's MR interface: