Skip to content

Commit 4cb181c

Browse files
committed
web: install acme certs to persistent storage
1 parent 1d2c68a commit 4cb181c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

web/rootfs/defaults/ssl.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ ssl_session_tickets off;
55

66
# ssl certs
77
{{ if .Env.ENABLE_LETSENCRYPT | default "0" | toBool }}
8-
ssl_certificate /etc/nginx/acme/{{ .Env.LETSENCRYPT_DOMAIN }}/fullchain.pem;
9-
ssl_certificate_key /etc/nginx/acme/{{ .Env.LETSENCRYPT_DOMAIN }}/key.pem;
8+
ssl_certificate /config/acme-certs/{{ .Env.LETSENCRYPT_DOMAIN }}/fullchain.pem;
9+
ssl_certificate_key /config/acme-certs/{{ .Env.LETSENCRYPT_DOMAIN }}/key.pem;
1010
{{ else }}
1111
ssl_certificate /config/keys/cert.crt;
1212
ssl_certificate_key /config/keys/cert.key;

web/rootfs/etc/cont-init.d/10-config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if [[ $DISABLE_HTTPS -ne 1 ]]; then
1616
sh ./acme.sh --install --home /config/acme.sh --accountemail $LETSENCRYPT_EMAIL
1717
popd
1818
fi
19-
if [[ ! -f /etc/nginx/acme/$LETSENCRYPT_DOMAIN/fullchain.pem ]]; then
19+
if [[ ! -f /config/acme-certs/$LETSENCRYPT_DOMAIN/fullchain.pem ]]; then
2020
STAGING=""
2121
if [[ $LETSENCRYPT_USE_STAGING -eq 1 ]]; then
2222
STAGING="--staging"
@@ -37,11 +37,11 @@ if [[ $DISABLE_HTTPS -ne 1 ]]; then
3737
echo "Exiting."
3838
exit 1
3939
fi
40-
mkdir -p /etc/nginx/acme/$LETSENCRYPT_DOMAIN
40+
mkdir -p /config/acme-certs/$LETSENCRYPT_DOMAIN
4141
if ! /config/acme.sh/acme.sh \
4242
--install-cert -d $LETSENCRYPT_DOMAIN \
43-
--key-file /etc/nginx/acme/$LETSENCRYPT_DOMAIN/key.pem \
44-
--fullchain-file /etc/nginx/acme/$LETSENCRYPT_DOMAIN/fullchain.pem ; then
43+
--key-file /config/acme-certs/$LETSENCRYPT_DOMAIN/key.pem \
44+
--fullchain-file /config/acme-certs/$LETSENCRYPT_DOMAIN/fullchain.pem ; then
4545
echo "Failed to install certificate."
4646
# this tries to get the user's attention and to spare the
4747
# authority's rate limit:

0 commit comments

Comments
 (0)