diff --git a/backend/internal/certificate.js b/backend/internal/certificate.js index 13f172e6..6f1fc4da 100644 --- a/backend/internal/certificate.js +++ b/backend/internal/certificate.js @@ -790,7 +790,7 @@ const internalCertificate = { const credentials_loc = '/etc/letsencrypt/credentials/credentials-' + certificate.id; const credentials_cmd = 'echo \'' + certificate.meta.dns_provider_credentials.replace('\'', '\\\'') + '\' > \'' + credentials_loc + '\' && chmod 600 \'' + credentials_loc + '\''; - const prepare_cmd = 'pip3 install ' + dns_plugin.package_name + '==' + dns_plugin.package_version; + const prepare_cmd = 'pip3 install ' + dns_plugin.package_name + '==' + dns_plugin.package_version + ' ' + dns_plugin.dependencies; // Whether the plugin has a ---credentials argument const has_config_arg = certificate.meta.dns_provider !== 'route53'; diff --git a/backend/setup.js b/backend/setup.js index 7e18c926..24429e87 100644 --- a/backend/setup.js +++ b/backend/setup.js @@ -176,9 +176,9 @@ const setupCertbotPlugins = () => { certificates.map(function (certificate) { if (certificate.meta && certificate.meta.dns_challenge === true) { const dns_plugin = dns_plugins[certificate.meta.dns_provider]; - const package_to_install = `${dns_plugin.package_name}==${dns_plugin.package_version}`; + const packages_to_install = `${dns_plugin.package_name}==${dns_plugin.package_version} ${dns_plugin.dependencies}`; - if (plugins.indexOf(package_to_install) === -1) plugins.push(package_to_install); + if (plugins.indexOf(packages_to_install) === -1) plugins.push(packages_to_install); // Make sure credentials file exists const credentials_loc = '/etc/letsencrypt/credentials/credentials-' + certificate.id; diff --git a/docker/Dockerfile b/docker/Dockerfile index acac5faf..011f5d62 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -38,6 +38,7 @@ COPY global /app/global WORKDIR /app RUN yarn install +RUN mkdir -p /etc/letsencrypt/credentials # Remove frontend service not required for prod, dev nginx config as well RUN rm -rf /etc/services.d/frontend RUN rm -f /etc/nginx/conf.d/dev.conf diff --git a/docker/dev/Dockerfile b/docker/dev/Dockerfile index 45ee534c..2d06d168 100644 --- a/docker/dev/Dockerfile +++ b/docker/dev/Dockerfile @@ -18,6 +18,7 @@ RUN cd /usr \ COPY rootfs / RUN rm -f /etc/nginx/conf.d/production.conf +RUN mkdir -p /etc/letsencrypt/credentials # s6 overlay RUN curl -L -o /tmp/s6-overlay-amd64.tar.gz "https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-amd64.tar.gz" \ diff --git a/global/certbot-dns-plugins.js b/global/certbot-dns-plugins.js index 3fdd5efc..5ae18728 100644 --- a/global/certbot-dns-plugins.js +++ b/global/certbot-dns-plugins.js @@ -24,7 +24,7 @@ module.exports = { display_name: 'Cloudflare', package_name: 'certbot-dns-cloudflare', package_version: '1.8.0', - dependencies: '', + dependencies: 'cloudflare', credentials: `# Cloudflare API token dns_cloudflare_api_token = 0123456789abcdef0123456789abcdef01234567`, full_plugin_name: 'dns-cloudflare',