Skip to content

Commit

Permalink
.env in production
Browse files Browse the repository at this point in the history
  • Loading branch information
wsknorth committed Dec 8, 2017
1 parent 79dde61 commit 7b177b3
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions docs/Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ $ npm start
Before we run the bot we need to check the `.env` file. For the `production` mode it will be
```
NODE_ENV=production
DEBUG=midnabot:*
DEBUG=midnabot*
DEBUG_COLORS=false
DEBUG_HIDE_DATE=true
```

Since I've an arch based server i wrote a `midnabot.service` file so we can manage the bot with `systemctl`. We just need to copy this file in `/etc/systemd/system`.
Expand All @@ -57,7 +59,17 @@ Usually for each application I've a user and a group named as the app, you can s
$ sudo useradd -r -s /bin/bash -G midnabot midnabot
```

Now we enable our service so that we can use the defaults systemctl commands `start`, `stop`, `status` to manage our bot.
Enable our service.
```bash
$ sudo systemctl enable midnabot
```

Possible commands: `start`, `stop`, `restart`
```bash
$ sudo systemctl <command> midnabot
```

Logs
```bash
$ sudo journalctl -u midnabot
```

0 comments on commit 7b177b3

Please sign in to comment.