Skip to content

Commit

Permalink
New dev ux: Add a docker build doc and improve error message (jgkawell#4
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tarasglek authored Apr 16, 2024
1 parent fb3f1fc commit 2b16e98
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ Steps:
1. Install Go >= 1.21.
2. Get the source code: `git clone https://github.com/jgkawell/yarr.git`
3. Build: `go build -o bin/yarr .`

Using Docker:

```bash
docker run --rm -u $(id -u):$(id -g) -v "$PWD":$PWD -w $PWD -e GOCACHE=$PWD/.cache golang go build -o bin/yarr
```
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func readConfig() config {
c.address = "0.0.0.0:7070"
}
if c.database == "" {
log.Fatal("database URI is required")
log.Fatal("Error YARR_DB is not set. Please set env var YARR_DB to postgres URI.")
}
auth := os.Getenv("YARR_AUTH")
if auth != "" {
Expand Down

0 comments on commit 2b16e98

Please sign in to comment.