Skip to content

Commit

Permalink
add docker build to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
DolceTriade committed Jan 3, 2024
1 parent 68d9aba commit 8b523f2
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8b523f2

Please sign in to comment.