GCE Virtual Machine (GCP)
A GCP-specific guide for deploying Briefer.
This guide describes how to set up Briefer on a Google Cloud Platform (GCP) instance using Google’s Compute Engine (GCE), Docker, and, optionally, Nginx as a reverse proxy for public access.
These are recommendations from October 2024 and may be subject to change due to updates in GCP. If you encounter any issues, please create an issue or submit a pull request on our GitHub repo.
Table of Contents
- Prerequisites
- Creating the Compute Engine Instance
- Installing Docker
- Running Briefer
- (Optional) Configuring Nginx for Public Access
- Conclusion
1. Prerequisites
- A Google Cloud Platform (GCP) account
- Access to Google Cloud Console
- An SSH key configured to access the GCP instance
2. Creating the Compute Engine Instance
- Access the Google Cloud Console and navigate to Compute Engine > VM instances.
- Click on “Create Instance.”
- We recommend configuring the VM with these settings (or higher):
- vCPUs: 2
- Memory: 8 GB
- Disk: 10 GB balanced
- IOPS: 3060 provisioned
- Processing capacity: 155 provisioned
These system requirements are ideal for most cases. However, they can be adjusted up or down depending on your project’s needs and demands.
- Give your instance a name and click “Create.”
Once the instance is initialized, connect to it via SSH.
3. Installing Docker
-
Update the instance’s packages:
-
Install the necessary packages for HTTPS repositories:
-
Add the Docker repository:
-
Install Docker:
-
Add your user to the
docker
group: -
Verify if Docker was installed correctly:
4. Running Briefer
After installing Docker, you can run Briefer using the following command:
Ensure that Briefer is running by accessing port 3000
on your instance’s public IP:
The Briefer interface should be accessible directly from the browser using the same URL.
You should not be able to login yet because you’re serving Briefer over HTTP
and have not set the ALLOW_HTTP
environment variable to true
. If you want
to continue using Briefer over HTTP please add --env ALLOW_HTTP=true
to the
docker run
command. If you want to use HTTPS, please set up SSL
certificates.
(Optional) 5. Configuring Nginx for Public Access
To expose Briefer through a reverse proxy using Nginx:
-
Install Nginx:
-
Ensure that Nginx is running by accessing the public IP of the instance in your browser.
-
Configure Nginx to serve Briefer:
We recommend that you configure your Nginx instance with a file similar to the one below.
-
Enable the new Nginx configs.
Now, Briefer will be accessible through your instance’s public IP without needing to specify port 3000
.