Skip to content

Commit d139387

Browse files
committed
Fix for seperate 'currently running' message
1 parent 7129973 commit d139387

File tree

4 files changed

+38
-13
lines changed

4 files changed

+38
-13
lines changed

.dev-docker-compose.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
services:
2+
monocker:
3+
container_name: monocker
4+
image: monocker
5+
build:
6+
context: .
7+
dockerfile: ./Dockerfile
8+
environment:
9+
SERVER_LABEL: $SERVER_LABEL
10+
SERVER_AVATAR: $SERVER_AVATAR
11+
DOCKER_HOST: $DOCKER_HOST
12+
MESSAGE_PLATFORM: $MESSAGE_PLATFORM
13+
LABEL_ENABLE: $LABEL_ENABLE
14+
ONLY_OFFLINE_STATES: $ONLY_OFFLINE_STATES
15+
EXCLUDE_EXITED: $EXCLUDE_EXITED
16+
PERIOD: $PERIOD
17+
DISABLE_STARTUP_MSG: $DISABLE_STARTUP_MSG
18+
19+
CUSTOM_NTFY_SERVER: $CUSTOM_NTFY_SERVER
20+
NTFY_USER: $NTFY_USER
21+
NTFY_PASS: $NTFY_PASS
22+
volumes:
23+
- /var/run/docker.sock:/var/run/docker.sock:ro
24+
restart: unless-stopped
25+
26+

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ services:
3737
DISABLE_STARTUP_MSG: 'false'
3838

3939
## ADVANCED NTFY SETTINGS
40-
# CUSTOM_NTFY_SERVER: 'https://ntfy.nesretep.net' # use your own NTFY server
40+
# CUSTOM_NTFY_SERVER: 'https://ntfy.yourdomain.net' # use your own NTFY server
4141
# NTFY_USER: 'user' # use a username and password to login (on ntfy.sh or your own server)
4242
# NTFY_PASS: 'psw'
4343
volumes:

index.js

+10-11
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,6 @@ console.log(`Monitoring started
6666
- Display SHA ID: ` + SHA);
6767

6868
console.log()
69-
if(DISABLE_STARTUP_MSG.toLowerCase()!='true'){
70-
send(`Monitoring started
71-
-- Version: ` + pjson.version + `
72-
-- Messaging platform: ` + MESSAGE_PLATFORM.split("@")[0] +`
73-
-- Polling period: ` + PERIOD + ` seconds` +`
74-
-- Only offline state monitoring: ` + ONLY_OFFLINE_STATES +`
75-
-- Only include labelled containers: ` + LABEL_ENABLE +`
76-
-- Do not monitor 'Exited': ` + EXCLUDE_EXITED +`
77-
-- Disable Startup Messages: ` + DISABLE_STARTUP_MSG +`
78-
-- Display SHA ID: ` + SHA);
79-
}
8069

8170
async function sendTelegram(message) {
8271
let notify = new Telegram({ token: msgDetails[1], chatId: msgDetails[2] });
@@ -268,6 +257,16 @@ async function list() {
268257
console.log(" - Currently monitoring " + newConArray.length + " (running) containers");
269258
if(DISABLE_STARTUP_MSG.toLowerCase()!='true'){
270259
//send("Currently monitoring " + newConArray.length + " (running) containers");
260+
messages =`Monitoring started
261+
-- Version: ` + pjson.version + `
262+
-- Messaging platform: ` + MESSAGE_PLATFORM.split("@")[0] +`
263+
-- Polling period: ` + PERIOD + ` seconds` +`
264+
-- Only offline state monitoring: ` + ONLY_OFFLINE_STATES +`
265+
-- Only include labelled containers: ` + LABEL_ENABLE +`
266+
-- Do not monitor 'Exited': ` + EXCLUDE_EXITED +`
267+
-- Disable Startup Messages: ` + DISABLE_STARTUP_MSG +`
268+
-- Display SHA ID: ` + SHA +`
269+
`;
271270
messages += "Currently monitoring " + newConArray.length + " (running) containers" + "\r\n";
272271
}
273272
isFirstRun=false;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "monocker",
3-
"version": "2.10.3",
3+
"version": "2.10.4",
44
"description": "Monitors and alerts for docker containers state changes",
55
"type": "module",
66
"main": "index.js",

0 commit comments

Comments
 (0)