Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 1.93 KB

README.md

File metadata and controls

39 lines (30 loc) · 1.93 KB

Nodemon-telegram - telegram bot for nodemon monitoring service

Options / Configuration parameters

Any option can be set in a CLI parameter or environment variable form. The CLI form has higher priority than the environment variable form. To set an option as a CLI parameter use kebab-case option name. To do the same as environment variable form use UPPER_SNAKE_CASE option name.

List of supported options in kebab-case form

  • -behavior (string) — Behavior is either webhook or polling (default "webhook"). Communication used between Telegarm and the bot
  • -bind (string) — Local network address to bind the HTTP API of the service on.
  • -development (bool) — Development mode. It is used for zap logger.
  • -log-level (string) — Logging level. Supported levels: DEBUG, INFO, WARN, ERROR, FATAL. Default logging level INFO. (default "INFO")
  • -nano-msg-pair-telegram-url (string) — Nanomsg IPC URL for pair socket (default "ipc: ///tmp/nano-msg-nodemon-pair.ipc"). Used for communication between the monitoring and bot services.
  • -nano-msg-pubsub-url (string) — Nanomsg IPC URL for pubsub socket (default "ipc: ///tmp/telegram/nano-msg-nodemon-pubsub.ipc"). Used by the bot to subscribe to alerts generated by the monitoring service.
  • -public-url (string) — The public url (for webhook only) for Telegram to send events to the bot service.
  • -telegram-chat-id (int) — Telegram chat ID to send alerts through a specific chat.
  • -tg-bot-token (string) — The secret token used to authenticate the bot in Telegram.
  • -webhook-local-address (string) — The port (for webhook only) used for the webhook internal server (default ":8081")

Build requirements

  • Make utility
  • Golang toolchain

Docker

To build docker image for this service execute these commands from the root of the project:

  docker build -t nodemon-telegram -f ./Dockerfile-nodemon-telegram .