diff --git a/conf/full.yaml b/conf/full.yaml index 0fc396209a82e..70db9b6ded64c 100644 --- a/conf/full.yaml +++ b/conf/full.yaml @@ -89,6 +89,11 @@ packages: # Advanced settings ##################################################################### +## Special packages publish configurations +#publish: +## This will allow the publisher to publish packages even if any uplink is down. +# allow_offline: true + # if you use nginx with custom path, use this to override links #url_prefix: https://dev.company.local/verdaccio/ diff --git a/lib/storage.js b/lib/storage.js index 5b5aa0c5b831b..22598cdf0bdca 100644 --- a/lib/storage.js +++ b/lib/storage.js @@ -83,6 +83,9 @@ class Storage { // if uplink fails with a status other than 404, we report failure if (_.isNil(err_results[i][0]) === false) { if (err_results[i][0].status !== 404) { + if (_.isNil(this.config.publish) === false && this.config.publish.allow_offline) { + return resolve(); + } return reject(Error[503]('one of the uplinks is down, refuse to publish')); } }