mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 15:13:33 +01:00
Allow for configure writing to different dir than BASEDIR (read-only FS) #483
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @schnatterer on GitHub (Jun 27, 2020).
I'd like to run dehydrated in a "docker" container with read-only root file system for security reasons.
For this to work, all writeable directories are mounted as separate volumes.
dehydrated is not compatible with this approach, because it writes accounts, lockfile, chains, etc. in the
BASEDIR, i.e. next to thedehydratedscript.Mounting
/etc/dehydrated/as a volume makes the whole process complicated, becausedehydratedthen is location within the volume.So what I like to achieve is to separate the
dehydratedscript from the writeable dirs.I'm eager to open a PR, but I'm not sure what's the best option to implement this.
BASEDIR?LOCKFILE,CHAINCACHE, etc.) to configuration?One option would be to check if the values are present in the environment before setting defaults, e.g. like so
This would allow for configuring the whole thing via the environment. Very 12-factor-y 😉
@jobe1986 commented on GitHub (Jun 27, 2020):
Dehydrated has support for a "config" file. An example of said file can be found in docs/examples/ and it does allow you to configure BASEDIR amongst MANY other options.
You can also tell dehydrated to use a config file in a location other then the script's directory by using the --config command line parameter.
A copy of the example config can be found on github at https://github.com/dehydrated-io/dehydrated/blob/master/docs/examples/config
@schnatterer commented on GitHub (Jun 27, 2020):
@jobe1986 Thanks for pointing out the
BASEDIRoption in theconfig. Works fine! How could I miss that one 🙈 ?BTW if someone ever stumbles upon this issue - here's an example how to use
BASEDIRinconfig.schnatterer/letsencrypt-tomcat@db68c08