From 856b05147c5c22b86897858ac5c6adcbbc12d083 Mon Sep 17 00:00:00 2001 From: andryyy Date: Thu, 22 Jun 2017 09:06:24 +0200 Subject: [PATCH 1/2] Skip LE with configuration parameter --- data/Dockerfiles/acme/docker-entrypoint.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/Dockerfiles/acme/docker-entrypoint.sh b/data/Dockerfiles/acme/docker-entrypoint.sh index 4009ca1f..a02e2d57 100755 --- a/data/Dockerfiles/acme/docker-entrypoint.sh +++ b/data/Dockerfiles/acme/docker-entrypoint.sh @@ -1,5 +1,11 @@ #!/bin/bash +if [[ ! "${SKIP_LETS_ENCRYPT}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then + echo "Skipping Let's Encrypt..." + exit 0 +fi + + ACME_BASE=/var/lib/acme SSL_EXAMPLE=/var/lib/ssl-example mkdir -p ${ACME_BASE}/acme/private From 2c3d649f0f0e26222b115cb6303a420eecda227e Mon Sep 17 00:00:00 2001 From: andryyy Date: Thu, 22 Jun 2017 09:06:28 +0200 Subject: [PATCH 2/2] Skip LE with configuration parameter --- docker-compose.yml | 5 ++--- generate_config.sh | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ec99b8cc..905e144a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -284,20 +284,19 @@ services: acme-mailcow: depends_on: - nginx-mailcow - image: mailcow/acme:1.0 + image: mailcow/acme:1.1 build: ./data/Dockerfiles/acme dns: - 172.22.1.254 dns_search: mailcow-network - # All domains to be included in the certificate environment: - CONTAINERS_RESTART=mailcowdockerized_postfix-mailcow_1 mailcowdockerized_dovecot-mailcow_1 mailcowdockerized_nginx-mailcow_1 - # Additional subject alternate names - ADDITIONAL_SAN=${ADDITIONAL_SAN} - MAILCOW_HOSTNAME=${MAILCOW_HOSTNAME} - DBNAME=${DBNAME} - DBUSER=${DBUSER} - DBPASS=${DBPASS} + - SKIP_LETS_ENCRYPT=${SKIP_LETS_ENCRYPT:-n} volumes: - ./data/web/.well-known/acme-challenge:/var/www/acme:rw - ./data/assets/ssl:/var/lib/acme/:rw diff --git a/generate_config.sh b/generate_config.sh index 8ee73231..43b46cfe 100755 --- a/generate_config.sh +++ b/generate_config.sh @@ -78,6 +78,10 @@ COMPOSE_PROJECT_NAME=mailcow-dockerized # Additional SAN for the certificate ADDITIONAL_SAN= +# To never run acme-mailcow for Let's Encrypt, set this to y +SKIP_LETS_ENCRYPT=n + + EOF mkdir -p data/assets/ssl