Skip to content

Commit

Permalink
Docker invocations need mapped volume
Browse files Browse the repository at this point in the history
So prefs can be persisted.

Add a `debug platform` command.
  • Loading branch information
rgalanakis committed Jan 10, 2024
1 parent 9489e48 commit 00fd6be
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ docker-run-version:
@docker run -it webhookdb-cli version --time

docker-run-%:
@docker run -it webhookdb-cli $(*)
@docker run -v ~/.webhookdb/dockercli:/root -it webhookdb-cli $(*)

dockerhub-run-version:
@docker run -it webhookdb/webhookdb-cli:latest version --time
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ so you have immediate, reliable access to all your data.

## Installing

Use the docker container:
Use the docker container (note you need to mount `/root` to persist auth info between invocations):

```
$ docker run -it webhookdb/webhookdb-cli:latest version
0.13.0 (acb64d0f)
$ docker run -v ~/.webhookdb/dockercli:/root -it webhookdb/webhookdb-cli:latest auth login
```

On MacOS, install from Homebrew:
Expand Down
12 changes: 12 additions & 0 deletions cmd/cmd_debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ var debugCmd = &cli.Command{
return nil
}),
},
{
Name: "platform",
Usage: "Print out information about the current platform.",
Action: cliAction(func(c *cli.Context, ac appcontext.AppContext, ctx context.Context) error {
home, err := ac.FS.UserHomeDir()
if err != nil {
home = fmt.Sprintf("error: %s", err)
}
fmt.Fprintf(c.App.Writer, "Home: %s\n", home)
return nil
}),
},
{
Name: "update-auth-display",
Usage: "Used to update the WASM terminal on startup.",
Expand Down

0 comments on commit 00fd6be

Please sign in to comment.