Skip to content

Commit

Permalink
Add Docker section to READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinqian00 committed Oct 9, 2023
1 parent 8d7d113 commit e489c8c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,15 @@ we will receive the following error message
```
Compilation error: no Patterns to match against, or one or more Profiles lacks Patterns
```

## Docker

To use with Docker, pull the image `yetanalytics/persephone:[tag]` and execute the following:

```
docker run -v [filepath]:/persephone/[filepath] -it yetanalytics/persephone:docker /persephone/bin/persephone.sh <subcommand> <args>
```

The container will run and exit once the command completes. The `-v` command can be use to map filepaths for resources (e.g. Profiles and Statements) to the Docker working directory `/persephone`.

Note that if `/persephone/bin/persephone.sh validate <args>` is not provided, then the container will run `persephone.sh --help` by default.
10 changes: 10 additions & 0 deletions doc/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,13 @@ As with validation, Pattern matching works with two or more Profiles:
--profile sample_profiles/catch.json
```
though you should be careful not to include any duplicate Profile or Pattern IDs or else you will receive an error.

## Docker

To use with Docker, pull the image `yetanalytics/persephone:[tag]` and execute the following:

```
docker run -v [filepath]:/persephone/[filepath] -p 8080:8080 -it yetanalytics/persephone:docker /persephone/bin/server.sh <subcommand> <args>
```

The container will run a Persephone server on port 8080. The `-v` command can be use to map filepaths for resources (e.g. Profiles and Statements) to the Docker working directory `/persephone`.

0 comments on commit e489c8c

Please sign in to comment.