Skip to content

Commit

Permalink
Updates to doco and general code tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
petersem committed May 19, 2024
1 parent f12539b commit 7129973
Show file tree
Hide file tree
Showing 5 changed files with 1,353 additions and 15 deletions.
13 changes: 6 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ services:
# Optional label to preface messages. Handy if you are running multiple versions of Monocker
SERVER_LABEL: 'Dev'
# Optional avatar image URL to add to messages. Handy if you are running Monocker on different machines
# -> ONLY supported by discord & ntfy (mobile app)
# -> ONLY supported by discord, slack & ntfy
SERVER_AVATAR: 'https://content.invisioncic.com/u329766/monthly_2024_05/monocker.png.ba5ffdb390b627097d2a53645cf87350.png'
# [Optional] - Set this value to a docker socket URL, if you want to connect to docker this way. Leave it blank or omit it otherwise
#DOCKER_HOST: 'tcp://192.168.1.134:2375'
# DOCKER_HOST: 'tcp://192.168.1.134:2375'

# Specify the messaging platform and details, or leave blank if only wanting container logs (pick one only)
# MESSAGE_PLATFORM: 'telegram@your_bot_id@your_chat_id'
# MESSAGE_PLATFORM: 'pushbullet@your_api_key@your_device_id'
# MESSAGE_PLATFORM: 'pushover@your_user_key@your_app_api_token'
MESSAGE_PLATFORM: 'discord@xxxxx'
MESSAGE_PLATFORM: 'discord@webhook_url'
# MESSAGE_PLATFORM: 'ntfy@topic_title'
# MESSAGE_PLATFORM: 'slack@bot_user_oauth_token@your_chat_id'
# MESSAGE_PLATFORM: ''
Expand All @@ -37,10 +37,9 @@ services:
DISABLE_STARTUP_MSG: 'false'

## ADVANCED NTFY SETTINGS
#CUSTOM_NTFY_SERVER: 'https://custom.ntfy.com' # use your own NTFY server
#NTFY_USER: 'user' # use a username and password to login (on ntfy.sh or your own server)
#NTFY_PASS: 'password'

# CUSTOM_NTFY_SERVER: 'https://ntfy.nesretep.net' # use your own NTFY server
# NTFY_USER: 'user' # use a username and password to login (on ntfy.sh or your own server)
# NTFY_PASS: 'psw'
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
Expand Down
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ if(DISABLE_STARTUP_MSG.toLowerCase()!='true'){
-- Display SHA ID: ` + SHA);
}



async function sendTelegram(message) {
let notify = new Telegram({ token: msgDetails[1], chatId: msgDetails[2] });
await notify.send(message, { timeout: 10000 }, { parse_mode: "html" });
Expand Down Expand Up @@ -130,7 +128,7 @@ async function sendNtfyAuth(title, message) {
iconURL: SERVER_AVATAR
});
} catch (e) {
console.error(e.message);
console.error("** NTFY Exception: " + e.message);
}
}

Expand All @@ -145,7 +143,7 @@ async function sendNtfy(title, message) {
iconURL: SERVER_AVATAR,
});
} catch (e) {
console.error(e.message);
console.error("** NTFY Exception: " + e.message);
}
}

Expand Down Expand Up @@ -315,3 +313,4 @@ async function run() {

// start processing
run();

Loading

0 comments on commit 7129973

Please sign in to comment.