From 8b523f23634db097b569b35f1eddbb8fe9cfe0c7 Mon Sep 17 00:00:00 2001 From: Harsh Modi Date: Wed, 3 Jan 2024 00:45:11 -0800 Subject: [PATCH] add docker build to readme --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 2ed1ab3..d175eae 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,32 @@ Blade is a Bazel BEP viewer. It's in its early stages, but should be generally f ![screenshot](img/ss.png) +# Quick Start + +## Docker + Emphemeral SQLite + +You can run this using Docker: + +``` +docker run --rm -p 3000:3000 -p 50332:50332 -v $HOME:$HOME ghcr.io/dolcetriade/blade:0.1 --db_path sqlite:///tmp/blade.db -l +``` + +Then you can run: + +``` +bazel test -c opt --bes_backend=grpc://localhost:50332 --bes_results_url="http://localhost:3000/invocation/" //... +``` + +If you want the database to be persistent, you bind mount a location in. You need to bind mount `$HOME` so you can access build logs. If you have a local remote cache, you can use that instead. You can override bytestream locations with alternate locations by passing in `-o bytestream://original.com=http://127.0.0.1:3834`. This flag can be passed in multiple times. It might be useful to set the bazel flag `--remote_bytestream_uri_prefix`. If you use a remote cache, you can omit the `-l` flag which prevents reading local files, which is a security risk since this would allow people to read arbitrary files on the host. + +## PostgreSQL + +There isn't a fully fleshed out example for this... Assuming you can access postgresql from the docker container: + +``` +docker run --rm -p 3000:3000 -p 50332:50332 ghcr.io/dolcetriade/blade:0.1 --db_path postgres://username:password@localhost/diesel_demo +``` + # Building ## Environment