diff --git a/README.md b/README.md index d2ec3a2..ef114fe 100644 --- a/README.md +++ b/README.md @@ -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)
diff --git a/egg.json b/egg.json
index a207630..05c7125 100644
--- a/egg.json
+++ b/egg.json
@@ -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"
}
diff --git a/src/discord-bot.ts b/src/discord-bot.ts
index 7045f47..948454f 100644
--- a/src/discord-bot.ts
+++ b/src/discord-bot.ts
@@ -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;
diff --git a/src/game-server.ts b/src/game-server.ts
index ae78fc9..ffabf8f 100644
--- a/src/game-server.ts
+++ b/src/game-server.ts
@@ -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: {
diff --git a/src/server.ts b/src/server.ts
index 73bee98..bd138d2 100644
--- a/src/server.ts
+++ b/src/server.ts
@@ -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;
diff --git a/src/telegram-bot.ts b/src/telegram-bot.ts
index 24f9b74..98265bb 100644
--- a/src/telegram-bot.ts
+++ b/src/telegram-bot.ts
@@ -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;
diff --git a/src/watcher.ts b/src/watcher.ts
index 53a3e67..1e7a375 100644
--- a/src/watcher.ts
+++ b/src/watcher.ts
@@ -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;