Replies: 1 comment 2 replies
|
This already works - the variables just have slightly different names than you guessed.
Your example becomes: environment:
ACME_JSON_PATH: /traefik-certs/acme.json
ACCESS_LOG_PATH: /traefik-logs/access.log
volumes:
- traefik_certs:/traefik-certs:ro
- traefik_logs:/traefik-logs:roI tested that exact shape - a volume mounted as a directory with the file inside it - and both resolve. The read guard adds the directory named by each variable to its allow list, so a path outside Both can also be set in Settings, under Certificates and Logs respectively, which takes precedence over the environment variable if you'd rather not restart the container to change them. Remote agents take the same two variables, so the same applies there. Documented in Environment Variables. |
Uh oh!
There was an error while loading. Please reload this page.
What problem does this solve?
Traefik Manager currently expects the Traefik ACME and access log files to be mounted at fixed paths:
This works well with bind mounts, but is awkward when i have configured Traefik to store its certificates and logs in Docker named volumes.
A named volume can be mounted into Traefik Manager, but Docker mounts it as a directory rather than allowing an individual file from that volume to be mounted directly at /app/acme.json or /app/logs/access.log.
Proposed solution
Allow the paths to the ACME file and access log file inside the Traefik Manager container to be configurable, preferably through environment variables.
For example:
This would allow users to mount existing Traefik named volumes as directories and point Traefik Manager to the actual files within those volumes, while keeping the current paths as defaults for backward compatibility.
Alternatives you've considered
No response
Which area does this relate to?
Other
Additional context
Ideally the existing defaults would remain:
so existing deployments would require no changes.
All reactions