Skip to content

Commit

Permalink
Small fixes and readme clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowMB committed Aug 5, 2018
1 parent f9cb61f commit c82fdb9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ RUN pip3 install -r requirements.txt
COPY . /app

# Define entrypoint of the app
ENTRYPOINT ["python3", "-u", "extractor.py"]
ENTRYPOINT ["python3", "-u", "extractor.py -c data/acme.json -d certs"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ docker run --name extractor -d \
-v /opt/traefik:/app/data \
-v ./certs:/app/certs \
-v /var/run/docker.socket:/var/run/docker.socket \
snowmb/traefik-certificate-extractor
snowmb/traefik-certificate-extractor
```
Mount the whole folder containing the traefik certificate file as `/app/data`. The extracted certificates are going to be written to `/app/certs`.
Mount the whole folder containing the traefik certificate file (`acme.json`) as `/app/data`. The extracted certificates are going to be written to `/app/certs`.
The docker socket is used to find any containers with this label: `com.github.SnowMB.traefik-certificate-extractor.restart_domain=<DOMAIN>`.
If the domains of an extracted certificate and the restart domain matches, the container is restarted. Multiple domains can be given seperated by `,`.
Expand Down
2 changes: 1 addition & 1 deletion extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def doTheWork(self):
parser.add_argument('-f', '--flat', action='store_true',
help='outputs all certificates into one folder')
parser.add_argument('-r', '--restart_container', action='store_true',
help='uses the docker API to restart containers that are labeled accordingly')
help="uses the docker API to restart containers that are labeled with 'com.github.SnowMB.traefik-certificate-extractor.restart_domain=<DOMAIN>' if the domain name of a generated certificates matches. Multiple domains can be seperated by ','")
parser.add_argument('--dry-run', action='store_true', dest='dry',
help="Don't write files and do not start docker containers.")
group = parser.add_mutually_exclusive_group()
Expand Down

0 comments on commit c82fdb9

Please sign in to comment.