This docker container checks the validation of certificates for a list of domains. It can send an email, when they expire at specific days/hours. It is written in Node.js.
docker run --rm -e DEBUG=1 boldt/certchecker
This container contains the following config.js:
var Config = {
domains: [
'google.com',
'facebook.com',
'twitter.com'
],
alert : {
hours: [1, 6, 12],
days: [1, 7, 14, 21]
},
reporttypes: ['console']
};
module.exports = Config;
DEBUG=1, so we see the result for all configured domains immediatly, not only at the specific hours/days.The result should look similar to the following (ordered by hours):
google.com expires in 1580 hours / 65 days
facebook.com expires in 1753 hours / 73 days
twitter.com expires in 3121 hours / 130 days
The container can be configured with a JavaScript-object.
docker run --rm -e DEBUG=1 -v /path/to/config.js:/app/config.js boldt/certchecker
The following provides an exhaustive example:
var Config = {
domains: [ // List of domains to be checked
'domainA.com',
'domainB.com',
'domainC.com'
],
alert : { // When do you want to be alerted?
hours: [1, 6, 12],
days: [1, 7, 14, 21]
},
reporttypes: ['console', 'mail'], // You can be reported by console or by mail
nodemailer : { // We use nodemailer, thus use a vaild nodemailer
host: "mail.domain.con",
port: 587,
secure: false, // true for 465, false for other ports
auth: {
user: '[email protected]', // user
pass: 'password' // password
}
},
mailOptions : {
from: '[email protected]', // sender address
to: ['[email protected]'], // list of receivers
subject: 'Certificates are going to expire!'
}
};
module.exports = Config;
Run the docker command hourly:
0 * * * * docker run --rm -e -v /path/to/config.js:/app/config.js DEBUG=1 boldt/certchecker
Content type
Image
Digest
Size
37.1 MB
Last updated
almost 7 years ago
docker pull boldt/certchecker