mirror of
https://github.com/a-sync/game-server-watcher.git
synced 2026-08-04 03:05:26 -04:00
add heroku 1 click deployment support
* Procfile, app.json, `PORT` env
This commit is contained in:
@@ -117,6 +117,8 @@ _The bot has no cleanup functionality, left over messages must be removed manual
|
||||
# Deployment
|
||||
Check the wiki page for detailed instructions on [how to setup a self deploying free cloud instance at cloudno.de](https://github.com/a-sync/game-server-watcher/wiki/Free-hosting-via-cloudno.de).
|
||||
|
||||
[](https://heroku.com/deploy)
|
||||
|
||||
## Hosting
|
||||
Make sure all the [requirements](#requirements) are met!
|
||||
_**Protip:** check the node.js version with `node -v`._
|
||||
|
||||
31
app.json
Normal file
31
app.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "Game Server Watcher",
|
||||
"description": "A simple discord/telegram bot that can be hosted on a free service to monitor your game servers and players in style. 😎",
|
||||
"website": "https://github.com/a-sync/game-server-watcher",
|
||||
"repository": "https://github.com/a-sync/game-server-watcher",
|
||||
"logo": "https://i.imgur.com/2Ok3pxv.png",
|
||||
"env": {
|
||||
"SECRET": {
|
||||
"description": "Admin secret",
|
||||
"required": true,
|
||||
"generator": "secret"
|
||||
},
|
||||
"REFRESH_TIME_MINUTES": {
|
||||
"description": "Game server info refresh interval in minutes [DEPRECETED]",
|
||||
"required": true,
|
||||
"value": "5"
|
||||
},
|
||||
"DISCORD_BOT_TOKEN": {
|
||||
"description": "Discord bot token",
|
||||
"required": false
|
||||
},
|
||||
"TELEGRAM_BOT_TOKEN": {
|
||||
"description": "Telegram bot token",
|
||||
"required": false
|
||||
},
|
||||
"STEAM_WEB_API_KEY": {
|
||||
"description": "Steam web API key",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
}
|
||||
2
dist/server.js
vendored
2
dist/server.js
vendored
@@ -11,7 +11,7 @@ require("dotenv/config");
|
||||
const watcher_1 = require("./watcher");
|
||||
const CACHE_MAX_AGE = parseInt(process.env.CACHE_MAX_AGE || '0', 10);
|
||||
const APP_HOST = process.env.app_host || process.env.APP_HOST || '0.0.0.0';
|
||||
const APP_PORT = parseInt(process.env.app_port || process.env.APP_PORT || '8080', 10);
|
||||
const APP_PORT = parseInt(process.env.PORT || process.env.app_port || process.env.APP_PORT || '8080', 10);
|
||||
const SECRET = process.env.SECRET || '';
|
||||
const DATA_PATH = process.env.DATA_PATH || './data/';
|
||||
const DBG = Boolean(process.env.DBG || false);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "a-sync@devs.space",
|
||||
"license": "ISC",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@commonify/lowdb": "^3.0.0",
|
||||
"discord.js": "^12.5.3",
|
||||
|
||||
@@ -9,7 +9,7 @@ import { GameServerConfig, main, readConfig, updateConfig } from './watcher';
|
||||
|
||||
const CACHE_MAX_AGE = parseInt(process.env.CACHE_MAX_AGE || '0', 10);
|
||||
const APP_HOST = process.env.app_host || process.env.APP_HOST || '0.0.0.0';
|
||||
const APP_PORT = parseInt(process.env.app_port || process.env.APP_PORT || '8080', 10);
|
||||
const APP_PORT = parseInt(process.env.PORT || process.env.app_port || process.env.APP_PORT || '8080', 10);
|
||||
const SECRET = process.env.SECRET || '';
|
||||
const DATA_PATH = process.env.DATA_PATH || './data/';
|
||||
const DBG = Boolean(process.env.DBG || false);
|
||||
|
||||
Reference in New Issue
Block a user