### Install Bazelisk with Yarn Source: https://github.com/envoyproxy/envoy-website/blob/main/README.md Install Bazelisk, a tool that automatically manages Bazel versions, using Yarn. This is part of the setup for building the Envoy website on a host machine. ```bash yarn ``` -------------------------------- ### Install Build Tools on Debian Source: https://github.com/envoyproxy/envoy-website/blob/main/README.md Install essential build tools like a compiler (clang or GCC) and related development utilities on Debian-based systems. This is required for building the documentation part of the website. ```bash apt get install build-essential ``` -------------------------------- ### Enable Live Rebuild with Docker Source: https://github.com/envoyproxy/envoy-website/blob/main/README.md Configure Docker Compose to automatically rebuild the Envoy website when changes are detected in the 'site/' directory. Set the BUILDER environment variable to 'live' before starting the Docker composition. ```bash export BUILDER=live docker compose up --build -d website ``` -------------------------------- ### Build Envoy Website with Docker Source: https://github.com/envoyproxy/envoy-website/blob/main/README.md Use Docker Compose to build the Envoy website. This command starts the build process in detached mode and builds the 'website' service. The first run may take a significant amount of time. ```bash docker compose up --build -d website ``` -------------------------------- ### Build Envoy Website on Host Source: https://github.com/envoyproxy/envoy-website/blob/main/README.md Execute the main script to build the Envoy website directly on your host machine. This script orchestrates the build process using Bazel. ```bash ./build-website.sh ``` -------------------------------- ### Build Website Without Docs Source: https://github.com/envoyproxy/envoy-website/blob/main/README.md Configure the Bazel build to exclude documentation generation. Set the BAZEL_BUILD_OPTIONS environment variable to '--config=nodocs' before running the build command, either in Docker or on the host. ```bash export BAZEL_BUILD_OPTIONS="--config=nodocs" ``` -------------------------------- ### Tail Docker Build Logs Source: https://github.com/envoyproxy/envoy-website/blob/main/README.md Monitor the build process of the Envoy website in real-time by tailing the Docker Compose logs for the 'website' service. This is useful for debugging build issues. ```bash docker compose logs -f ``` -------------------------------- ### Enable Live Rebuild on Host Source: https://github.com/envoyproxy/envoy-website/blob/main/README.md Trigger an automatic rebuild of the Envoy website on the host machine when changes occur. This command runs a script that monitors the specified directory and executes the build script upon detecting modifications. ```bash ./rebuild.sh ./site ./build-website.sh ``` -------------------------------- ### Rebuild Website with Docker Compose Source: https://github.com/envoyproxy/envoy-website/blob/main/README.md Manually trigger a rebuild of the Envoy website using Docker Compose after making changes. This command runs the 'build' service defined in the docker-compose.yml file. ```bash docker compose run build ``` -------------------------------- ### Enable Debug Logging for Build Source: https://github.com/envoyproxy/envoy-website/blob/main/README.md Enable detailed logging for the Envoy website build process. Set the DEBUG environment variable to '1' before initiating the build, applicable to both Docker and host builds. ```bash export DEBUG=1 ``` -------------------------------- ### Configure Environment Variables in .env Source: https://github.com/envoyproxy/envoy-website/blob/main/README.md Use a .env file to set environment variables that Docker Compose will automatically source. This allows for persistent configuration, such as enabling live rebuilding. ```sh export BUILDER=live ``` -------------------------------- ### Export User ID for Docker Builds Source: https://github.com/envoyproxy/envoy-website/blob/main/README.md Export your user's UID to ensure files created by Docker builds are owned by the host user. This is necessary for Docker to correctly manage file permissions. ```bash export UID ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.