Skip to content

Commit 92fd972

Browse files
committed
Updated readme
1 parent 8bff778 commit 92fd972

File tree

1 file changed

+40
-11
lines changed

1 file changed

+40
-11
lines changed

docker/README.md

+40-11
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
[![Github Tags](https://img.shields.io/github/v/tag/ravensorb/traefik-certificate-exporter?logo=github&logoColor=white)](https://github.com/ravensorb/traefik-certificate-exporter) [![Docker Pulls](https://img.shields.io/docker/pulls/ravensorb/traefik-certificate-exporter?logo=docker&logoColor=white)](https://hub.docker.com/r/ravensorb/traefik-certificate-exporter)
44

5-
This tool can be used to extract acme certificates (ex: lets encrupt) from traefik json files. The tool is design to watch for changes to a folder for any files that match a filespec (defaults to *.json however can be set to a specific file name) and when changes are detected it will process the file and extract any certificates that are in it to the specified output path
5+
This tool can be used to extract acme certificates (ex: lets encrypt) from traefik json files. The tool is design to watch for changes to a folder for any files that match a filespec (defaults to *.json however can be set to a specific file name) and when changes are detected it will process the file and extract any certificates that are in it to the specified output path
66

77
## Docker
88

99
```bash
1010
docker pull ravensorb/traefik-certificate-exporter:latest
1111
```
1212

13-
Then to run it via docker. This will only watch json file sthat start with "acme" and container the resolver name "resolver-http"
13+
### docker run (using env vars)
14+
15+
Then to run it via docker. This will only watch json file that start with "acme" and container the resolver name "resolver-http"
1416

1517
```bash
1618
docker run -it ravensorb/traefik-certificate-exporter:latest \
@@ -20,15 +22,23 @@ docker run -it ravensorb/traefik-certificate-exporter:latest \
2022
-e "TRAEFIK_CERTIFICATE_EXPORTER_SETTINGS_FILESPEC=acme-*.json"
2123
```
2224

23-
or with docker-compose
25+
### docker run (using config file)
26+
27+
This will run the container and maps the local ./data/config into the container. This folder should contain the config.yml file that the application will use.
28+
29+
```
30+
docker run -it ravensorb/traefik-certificate-exporter:latest \
31+
-v ${PWD}/data/config:/config \
32+
-v /mnt/traefik-data/letsencrypt:/data
33+
```
34+
35+
### docker-compose (using env vars)
2436

2537
```bash
26-
docker-compose up -d
38+
docker compose up -d
2739
```
2840

2941
```yaml
30-
version: "3.7"
31-
3242
services:
3343
traefik-certificate-exporter:
3444
image: ravensorb/traefik-certificate-exporter:latest
@@ -41,11 +51,30 @@ services:
4151
# - TRAEFIK_CERTIFICATE_EXPORTER_SETTINGS_FLAT=false # Indicates if certificates are exported in sub folders or a single folder
4252
# - TRAEFIK_CERTIFICATE_EXPORTER_SETTINGS.RESTARTCONTAINER=false # Indicates of the containers should be restarted after the export
4353
# - TRAEFIK_CERTIFICATE_EXPORTER_SETTINGS_DRYRUN=false # Set this to show what wil le exported (files will not actually be created)
44-
# - TRAEFIK_CERTIFICATE_EXPORTER_SETTINGS_RUNATSTART=true # Set this to run the export immediately on stratup
45-
- TRAEFIK_CERTIFICATE_EXPORTER_SETTINGS_RESOLVERINPATHNAME=true # Include the resolver name in the path when exporting
46-
- TRAEFIK_CERTIFICATE_EXPORTER_LOGGINGLEVEL=INFO # Logging level
47-
# - TRAEFIK_CERTIFICATE_EXPORTER_SETTINGS_INCLUDE_DOMAINS= # comma seperated list of domain names to only export
48-
# - TRAEFIK_CERTIFICATE_EXPORTER_SETTINGS_XCLUDE_DOMAINS= # comma seperated list of domain names to exlude from exporting
54+
# - TRAEFIK_CERTIFICATE_EXPORTER_SETTINGS_RUNATSTART=true # Set this to run the export immediately on startup
55+
- TRAEFIK_CERTIFICATE_EXPORTER_SETTINGS_RESOLVERINPATHNAME=true # Include the resolver name in the path when exporting
56+
- TRAEFIK_CERTIFICATE_EXPORTER_LOGGINGLEVEL=INFO # Logging level
57+
# - TRAEFIK_CERTIFICATE_EXPORTER_SETTINGS_INCLUDE_DOMAINS= # comma separated list of domain names to only export
58+
# - TRAEFIK_CERTIFICATE_EXPORTER_SETTINGS_EXCLUDE_DOMAINS= # comma separated list of domain names to exclude from exporting
59+
volumes:
60+
- /var/run/docker.sock:/var/run/docker.sock:ro # Only needed if you are going to be restarting containers
61+
- ./data/config:/config:rw # Only needed if you are going to set a config file to load
62+
- ./data/letsencrypt:/data:ro # Location of your acme files
63+
- ./data/certs:/certs:rw # Location you want to export certificates to
64+
```
65+
66+
### docker-compose (using env vars)
67+
68+
This will start the container and look in the ./data/config path that is mapped to /config for the configuration file
69+
70+
```bash
71+
docker compose up -d
72+
```
73+
74+
```yaml
75+
services:
76+
traefik-certificate-exporter:
77+
image: ravensorb/traefik-certificate-exporter:latest
4978
volumes:
5079
- /var/run/docker.sock:/var/run/docker.sock:ro # Only needed if you are going to be restarting containers
5180
- ./data/config:/config:rw # Only needed if you are going to set a config file to load

0 commit comments

Comments
 (0)