Skip to content

Commit

Permalink
Merge pull request #266 from cyqsimon/container-config
Browse files Browse the repository at this point in the history
Add config options to enable stats in container
  • Loading branch information
niklasf authored May 12, 2024
2 parents 5d5083e + b3ca5b7 commit 992d927
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Per default, runs with `n-1` cores, alternatively, specify the number of cores t
docker run -it --name fishnet -e KEY=abcdef -e CORES=n niklasf/fishnet:2
```

For the full list of configurable environment variables, see [docker-entrypoint.sh](/docker-entrypoint.sh).

To update, since we named the image `fishnet`:

```sh
Expand Down
9 changes: 8 additions & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#!/bin/bash -e

args=("--no-conf" "--no-stats-file")
args=("--no-conf")

if [ -n "$STATS_FILE" ]; then
# $STATS_FILE implies $ENABLE_STATS
args+=("--stats-file" "$STATS_FILE")
elif [ -z "$ENABLE_STATS" ]; then
args+=("--no-stats-file")
fi

if [ -n "$KEY" ]; then args+=("--key" "$KEY"); fi
if [ -n "$KEY_FILE" ]; then args+=("--key-file" "$KEY_FILE"); fi
Expand Down

0 comments on commit 992d927

Please sign in to comment.