Skip to content

Commit 60a4019

Browse files
committed
Always install additional dependencies for dns plugins
1 parent 7d693a4 commit 60a4019

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

backend/internal/certificate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ const internalCertificate = {
790790

791791
const credentials_loc = '/etc/letsencrypt/credentials/credentials-' + certificate.id;
792792
const credentials_cmd = 'echo \'' + certificate.meta.dns_provider_credentials.replace('\'', '\\\'') + '\' > \'' + credentials_loc + '\' && chmod 600 \'' + credentials_loc + '\'';
793-
const prepare_cmd = 'pip3 install ' + dns_plugin.package_name + '==' + dns_plugin.package_version;
793+
const prepare_cmd = 'pip3 install ' + dns_plugin.package_name + '==' + dns_plugin.package_version + ' ' + dns_plugin.dependencies;
794794

795795
// Whether the plugin has a --<name>-credentials argument
796796
const has_config_arg = certificate.meta.dns_provider !== 'route53';

backend/setup.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ const setupCertbotPlugins = () => {
176176
certificates.map(function (certificate) {
177177
if (certificate.meta && certificate.meta.dns_challenge === true) {
178178
const dns_plugin = dns_plugins[certificate.meta.dns_provider];
179-
const package_to_install = `${dns_plugin.package_name}==${dns_plugin.package_version}`;
179+
const packages_to_install = `${dns_plugin.package_name}==${dns_plugin.package_version} ${dns_plugin.dependencies}`;
180180

181-
if (plugins.indexOf(package_to_install) === -1) plugins.push(package_to_install);
181+
if (plugins.indexOf(packages_to_install) === -1) plugins.push(packages_to_install);
182182

183183
// Make sure credentials file exists
184184
const credentials_loc = '/etc/letsencrypt/credentials/credentials-' + certificate.id;

docker/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ COPY global /app/global
3838

3939
WORKDIR /app
4040
RUN yarn install
41+
RUN mkdir -p /etc/letsencrypt/credentials
4142

4243
# Remove frontend service not required for prod, dev nginx config as well
4344
RUN rm -rf /etc/services.d/frontend RUN rm -f /etc/nginx/conf.d/dev.conf

docker/dev/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ RUN cd /usr \
1818

1919
COPY rootfs /
2020
RUN rm -f /etc/nginx/conf.d/production.conf
21+
RUN mkdir -p /etc/letsencrypt/credentials
2122

2223
# s6 overlay
2324
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" \

global/certbot-dns-plugins.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
display_name: 'Cloudflare',
2525
package_name: 'certbot-dns-cloudflare',
2626
package_version: '1.8.0',
27-
dependencies: '',
27+
dependencies: 'cloudflare',
2828
credentials: `# Cloudflare API token
2929
dns_cloudflare_api_token = 0123456789abcdef0123456789abcdef01234567`,
3030
full_plugin_name: 'dns-cloudflare',

0 commit comments

Comments
 (0)