Setup for Local Development¶
Local Dev Configuration¶
The local deployment guide explains how to deploy Browsertrix Cloud with latest published images.
However, if you are developing locally, you will need to use your local images instead.
We recommend the following setup:
Copy the provided
./chart/examples/local-config.yamlHelm configuration file to a separate file
local.yaml, so that local changes to it will not be accidentally committed to git. From the root directory:
frontend_image, and pull policies in
./chart/local.yaml, which will ensure the local images are used:
Build the local backend and frontend images. The exact process depends on the Kubernetes environment you've selected in your initial deployment. Environment specific build instructions are as follows:
Rebuild the local images by running
./scripts/build-frontend.shscripts to build the images in the local Docker.
MicroK8s uses its own container registry, running on port 32000.
Ensure the registry add-on is enabled by running
microk8s enable registry
export REGISTRY=localhost:32000/and then run
./scripts/build-frontend.shto rebuild the images into the MicroK8S registry.
./chart/local.yaml, also uncomment the following lines to use the local images:
Minikube comes with its own image builder to update the images used in Minikube.
To build the backend image, run:
To build a local frontend image, run:
containerdby default. To use local images, they need to be imported after rebuilding.
Rebuild the images with Docker by running by running
./scripts/build-frontend.shscripts. (Requires Docker to be installed as well).
Serializer the images to .tar:
Import images into k3s containerd:
If you'd like to change other options, you can uncomment them as needed in
./chart/local.yamlor add additional overrides from
For example, to set a superuser email to
email@example.com password to
MySecretPassword!, uncomment that block and set:
Once the images have been built and config changes made in
the cluster can be re-deployed by running:
Refer back to the Local Development guide for additional information on running and debugging your local cluster.
Update the Images¶
After making any changes to backend code (in
./backend) or frontend code (in
./frontend), you'll need to rebuild the images as specified above, before running
helm upgrade ... to re-deploy.
Changes to settings in
./chart/local.yaml can be deployed with
helm upgrade ... directly.
Deploying Frontend Only¶
If you are just making changes to the frontend, you can also deploy the frontend separately using a dev server for quicker iteration.