* fix egg install script
 * fix DBG env evaluation
This commit is contained in:
Smith
2023-08-15 23:04:20 +02:00
parent 08e421ea5a
commit 93aef8e8d9
7 changed files with 10 additions and 9 deletions

View File

@@ -34,7 +34,7 @@ The project is in a very early stage. More detailed customization options and fe
* github action workflows to deploy to other cloud providers (aws, linode, atlantic, vultr, pikapods, okteto, ibm cloud etc.)
* SQL, JSON or object store database support (postgres, redis etc.)
* run as stateless serverless function (aws lambda, azure function, heroku, vercel, fly.io machines etc.)
* pterodactyl egg release
* ~~pterodactyl egg release~~
# Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See [deployment](#deployment) for notes on how to deploy the project on a live system.
@@ -104,7 +104,8 @@ If the original message created by the bot gets deleted, you need to flush the b
_The bot has no cleanup functionality, left over messages must be removed manually._
# Deployment
Check the wiki page for detailed instructions on [how to setup a self deploying free cloud instance at fly.io](https://github.com/a-sync/game-server-watcher/wiki/Free-hosting-via-fly.io).
Check the wiki page for detailed instructions on [how to setup a self deploying free cloud instance at fly.io](https://github.com/a-sync/game-server-watcher/wiki/Free-hosting-via-fly.io).
The latest Pterodactyl egg can always be found here: [🥚](https://raw.githubusercontent.com/a-sync/game-server-watcher/master/egg.json)
<p align="center">
<!--<a href="https://heroku.com/deploy?template=https%3A%2F%2Fgithub.com%2Fa-sync%2Fgame-server-watcher"><img src="https://www.herokucdn.com/deploy/button.svg" height="32" alt="Deploy to Heroku"></a>//TODO: support ephemeral storage-->
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fa-sync%2Fgame-server-watcher%2Fmaster%2Fazuredeploy.json"><img src="https://aka.ms/deploytoazurebutton" height="32" alt="Deploy to Azure"></a>

View File

@@ -10,7 +10,7 @@
"description": "A simple discord\/telegram bot that can be hosted on a free service to monitor your game servers and players in style. 😎",
"features": null,
"docker_images": {
"NodeJS 20": "ghcr.io\/parkervcp\/yolks:nodejs_20"
"Node.js 20": "ghcr.io\/parkervcp\/yolks:nodejs_20"
},
"file_denylist": [],
"startup": "env PORT={{SERVER_PORT}} \/usr\/local\/bin\/node \/home\/container\/dist\/server.js",
@@ -22,7 +22,7 @@
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\ncd \/mnt\/server\r\napt-get update && apt-get install git -yq --no-install-suggests --no-install-recommends --allow-downgrades --allow-remove-essential --allow-change-held-packages\r\ngit clone https:\/\/github.com\/a-sync\/game-server-watcher.git .\r\nnpm install\r\nnpm run build\r\nnpm prune --production",
"script": "#!\/bin\/bash\r\napt-get update && apt-get install ca-certificates git -yq --no-install-suggests --no-install-recommends --allow-downgrades --allow-remove-essential --allow-change-held-packages\r\ncd \/mnt\/server\r\ngit clone https:\/\/github.com\/a-sync\/game-server-watcher.git . && npm install && npm run build && npm prune --production",
"container": "node:20-bookworm-slim",
"entrypoint": "bash"
}

View File

@@ -4,7 +4,7 @@ import { GameServer } from './game-server';
import hhmmss from './lib/hhmmss';
const DATA_PATH = process.env.DATA_PATH || './data/';
const DBG = Boolean(process.env.DBG || false);
const DBG = Boolean(Number(process.env.DBG));
interface DiscordData {
channelId: string;

View File

@@ -7,7 +7,7 @@ import { GameServerConfig } from './watcher';
const STEAM_WEB_API_KEY = process.env.STEAM_WEB_API_KEY || '';
const DATA_PATH = process.env.DATA_PATH || './data/';
const DBG = Boolean(process.env.DBG || false);
const DBG = Boolean(Number(process.env.DBG));
interface GameServerDb {
population: {

View File

@@ -12,7 +12,7 @@ const HOST = process.env.HOST || '0.0.0.0';
const PORT = parseInt(process.env.PORT || '8080', 10);
const SECRET = process.env.SECRET || 'secret';
const DATA_PATH = process.env.DATA_PATH || './data/';
const DBG = Boolean(process.env.DBG || false);
const DBG = Boolean(Number(process.env.DBG));
let loop: NodeJS.Timeout | undefined;

View File

@@ -4,7 +4,7 @@ import { GameServer } from './game-server';
import hhmmss from './lib/hhmmss';
const DATA_PATH = process.env.DATA_PATH || './data/';
const DBG = Boolean(process.env.DBG || false);
const DBG = Boolean(Number(process.env.DBG));
interface TelegramData {
chatId: string;

View File

@@ -8,7 +8,7 @@ const REFRESH_TIME_MINUTES = parseInt(process.env.REFRESH_TIME_MINUTES || '2', 1
const DISCORD_BOT_TOKEN = process.env.DISCORD_BOT_TOKEN || '';
const TELEGRAM_BOT_TOKEN = process.env.TELEGRAM_BOT_TOKEN || '';
const DATA_PATH = process.env.DATA_PATH || './data/';
const DBG = Boolean(process.env.DBG || false);
const DBG = Boolean(Number(process.env.DBG));
interface DiscordConfig {
channelId: string;