Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.76 KB

README.md

File metadata and controls

38 lines (29 loc) · 1.76 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 Telegram 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")
  • -nats-msg-url (string) — Nats server URL for messaging (default "nats://127.0.0.1:4222"). Used by the bot to subscribe to alerts generated by the monitoring service and for communication between the monitoring and bot services.
  • -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 .