coreos-home-server/service/letsencrypt/container/run-hook
Alex Palaistras faa0420931 letsencrypt: Move to Debian, source-built image
This makes container builds more consistent, and therefore more
cacheable in relation to other containers.

In addition, certificates and keys are now copied to two separate
volumes, one containing all certificates (for use in services like
`nginx`, which may require unfettered access to certificates) and one
containing certificates only for a specific domain, for use in most
other cases.
2023-12-30 17:10:38 +00:00

10 lines
352 B
Bash
Executable File

#!/bin/sh
set -eu
# Copy certificates to dedicated directories.
for dir in "/var/lib/letsencrypt-certificates" "/var/lib/letsencrypt-certificate-$CERT_DOMAIN"; do
install --owner letsencrypt --group letsencrypt --mode 0644 "$LEGO_CERT_PATH" "$dir"
install --owner letsencrypt --group letsencrypt --mode 0640 "$LEGO_CERT_KEY_PATH" "$dir"
done