Skip to content

Commit

Permalink
Explain docker install, allow CONFIG from env
Browse files Browse the repository at this point in the history
  • Loading branch information
hensur committed Jun 29, 2018
1 parent 02df712 commit d298938
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@ A sample configration that configures the smtp server is provided in `scansmb.ex

Start it on the command line like this (this example makes use of all means of configuration):
```
PRINTER_HOST=192.168.8.111 python3 scansmb.py -c scansmb.conf -f [email protected] -t [email protected]
PRINTER_HOST=192.168.8.111 python3 scansmb.py -c scansmb.conf -f [email protected] -t [email protected]
```

Or use the docker image at [dockerhub](https://hub.docker.com/r/hensur/scansmb):
```
docker run -v $(pwd)/scansmb.conf:/scansmb.conf -e PRINTER_HOST=192.168.8.111 -e [email protected] -e [email protected] -e CONFIG=/scansmb.conf hensur/scansmb
```
2 changes: 1 addition & 1 deletion scansmb.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def loop(ctx, options):

def main():
parser = configargparse.ArgParser(default_config_files=['scansmb.conf'])
parser.add("-c", "--config", is_config_file=True, help="config file path")
parser.add("-c", "--config", is_config_file=True, help="config file path", env_var="CONFIG")
parser.add("-p", "--printer-host", required=True,
help="printer hostname", env_var="PRINTER_HOST")
parser.add("--smtp-user", required=True,
Expand Down

0 comments on commit d298938

Please sign in to comment.