Skip to content

Latest commit

 

History

History
77 lines (52 loc) · 1.39 KB

CONTRIBUTING.md

File metadata and controls

77 lines (52 loc) · 1.39 KB

Contributing

This guide is for everyone who want to contribute or who want to run a personal instance of Midnabot. If you need help or you want to report a bug, just open an issue.

Code Style

standard

This repository uses standard to maintain code style and consistency, and to avoid style arguments. npm test runs standard automatically, so you don't have to!

Development

Install dependencies

npm install

Create a .env file

PORT=<local port for the service>
TELEGRAM=<your telegram bot token>

Start

npm run dev

Deployment

Digitalocean app

In the infrastructures directory is avaliable a terraform script for an easy deployment on digitalocean app. Environment variables required are listen in infrastructures/main.tf if you want to deploy on a different service.

Systemd

First create a user and a group

sudo useradd -r -s /bin/bash -G midnabot midnabot

Copy the configuration file

sudo cp midnabot.service /etc/systemd/system/midnabot.service

Enable the service

sudo systemctl enable midnabot

Start the service

sudo systemctl start midnabot

Check logs

sudo journalctl -u midnabot