Skip to content

Commit

Permalink
updated packages and added container sha to output
Browse files Browse the repository at this point in the history
  • Loading branch information
petersem committed Dec 28, 2023
1 parent 04c7a62 commit 22db87f
Show file tree
Hide file tree
Showing 15 changed files with 376 additions and 214 deletions.
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped


16 changes: 8 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ server.listen(port, host, () => {});
// main program
let docker = new Docker({socketPath: '/var/run/docker.sock'});
// var docker = new Docker({
// protocol: 'http', //you can enforce a protocol
// host: 'localhost',
// port: 2375 //process.env.DOCKER_PORT || 2375
// });
// protocol: 'http', //you can enforce a protocol
// host: '192.168.1.135',
// port: 2375 //process.env.DOCKER_PORT || 2375
// });
const NODE_ENV = process.env.NODE_ENV || "production";
const SERVER_LABEL = process.env.SERVER_LABEL || "";
const MESSAGE_PLATFORM = process.env.MESSAGE_PLATFORM || "";
Expand Down Expand Up @@ -146,13 +146,13 @@ async function list(){
// if only offline is set, then only show state changes that are offline
if(ONLY_OFFLINE_STATES=='true'){
if(offlineStates.includes(c.State) || offlineStates.includes(c.State + " " + hcStatus)){
console.log(" - " +c.Names[0].replace("/","") + ": " + c.State + " " + hcStatus);
send(c.Names[0].replace("/","") +": "+c.State + " " + hcStatus);
console.log(" - " +c.Names[0].replace("/","") + ": " + c.State + " " + hcStatus + " " + c.ImageID);
send(c.Names[0].replace("/","") +": "+c.State + " " + hcStatus + " " + c.ImageID);
}
}
else{
console.log(" - " +c.Names[0].replace("/","") + ": " + c.State + " " + hcStatus);
send(c.Names[0].replace("/","") +": "+c.State + " " + hcStatus);
console.log(" - " +c.Names[0].replace("/","") + ": " + c.State + " " + hcStatus + " " + c.ImageID);
send(c.Names[0].replace("/","") +": "+c.State + " " + hcStatus + " " + c.ImageID);
}
}
}
Expand Down
170 changes: 121 additions & 49 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion node_modules/node-fetch/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions node_modules/node-fetch/lib/index.es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 22db87f

Please sign in to comment.