Skip to content

Commit

Permalink
Merge pull request #5277 from csgis/master
Browse files Browse the repository at this point in the history
Fixes #5260 Failed to get the LE certificates with SPC
  • Loading branch information
t-book authored Nov 17, 2019
2 parents bbc8fe3 + 3ccdbf1 commit b85d4d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/spcgeonode/letsencrypt/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.6
FROM alpine:3.8

# 1-2. Install system dependencies
RUN apk add --no-cache certbot py-pip && pip install pyopenssl==16.0.0 # Need to downgrade PyOpenSSL to 16.0.0 to avoid conflicts and solve the cryptography error : https://github.com/plesk/letsencrypt-plesk/issues/117
Expand Down
6 changes: 3 additions & 3 deletions scripts/spcgeonode/letsencrypt/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ set +e
# We run the command
if [ "$LETSENCRYPT_MODE" == "staging" ]; then
printf "\nTrying to get STAGING certificate\n"
certbot --config-dir "/spcgeonode-certificates/$LETSENCRYPT_MODE" certonly --webroot -w "/spcgeonode-certificates" -d "$HTTPS_HOST" -m "$ADMIN_EMAIL" --agree-tos --non-interactive --staging
certbot --config-dir "/spcgeonode-certificates/$LETSENCRYPT_MODE" certonly --webroot -w "/spcgeonode-certificates" -d "$HTTPS_HOST" -m "$ADMIN_EMAIL" --agree-tos --non-interactive --staging --server https://acme-v02.api.letsencrypt.org/directory
elif [ "$LETSENCRYPT_MODE" == "production" ]; then
printf "\nTrying to get PRODUCTION certificate\n"
certbot --config-dir "/spcgeonode-certificates/$LETSENCRYPT_MODE" certonly --webroot -w "/spcgeonode-certificates" -d "$HTTPS_HOST" -m "$ADMIN_EMAIL" --agree-tos --non-interactive
certbot --config-dir "/spcgeonode-certificates/$LETSENCRYPT_MODE" certonly --webroot -w "/spcgeonode-certificates" -d "$HTTPS_HOST" -m "$ADMIN_EMAIL" --agree-tos --non-interactive --server https://acme-v02.api.letsencrypt.org/directory
else
printf "\nNot trying to get certificate (simulating failure, because LETSENCRYPT_MODE variable was neither staging nor production\n"
/bin/false
Expand All @@ -45,5 +45,5 @@ echo "-----------------------------------------------------"
echo "FINISHED LETSENCRYPT ENTRYPOINT ---------------------"
echo "-----------------------------------------------------"

# Run the CMD
# Run the CMD
exec "$@"

0 comments on commit b85d4d8

Please sign in to comment.