nginx: create certdir directory before attempting symlink

single-dockerfile
Ubuntu 2 years ago
parent 9d6c61672c
commit fa14342f75
  1. 2
      Makefile
  2. 2
      nginx/docker-entrypoint.d/10-createkey.sh

@ -31,6 +31,8 @@ down:
$(DOCKER) down $(DOCKER) down
nginx-shell: nginx-shell:
$(DOCKER) exec nginx sh $(DOCKER) exec nginx sh
nginx-logs:
$(DOCKER) logs -f --tail 1000 nginx
grafana-shell: grafana-shell:
$(DOCKER) exec grafana bash $(DOCKER) exec grafana bash
hedgedoc-shell: hedgedoc-shell:

@ -7,6 +7,7 @@ if [ -z "$DOMAIN_NAME" ]; then
fi fi
certdir="/etc/letsencrypt/live/${DOMAIN_NAME}" certdir="/etc/letsencrypt/live/${DOMAIN_NAME}"
mkdir -p "$certdir"
# ensure that the keys are available with a fixed path # ensure that the keys are available with a fixed path
for key in fullchain.pem privkey.pem ; do for key in fullchain.pem privkey.pem ; do
@ -17,7 +18,6 @@ if [ -r "$certdir/fullchain.pem" ]; then
exit 0 exit 0
fi fi
mkdir -p "$certdir"
echo >&2 "$certdir: Creating temporary keys" echo >&2 "$certdir: Creating temporary keys"
openssl req \ openssl req \

Loading…
Cancel
Save