Skip to content

Commit

Permalink
🐋 upd. dockerfile
Browse files Browse the repository at this point in the history
 * upd. jsoneditor build
 * upd. readme
  • Loading branch information
a-sync committed Apr 30, 2024
1 parent d7ffa7c commit 8114cc9
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 19 deletions.
29 changes: 17 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
FROM node:20 as builder
# syntax = docker/dockerfile:1

##########
FROM node:20 as base
LABEL fly_launch_runtime="Node.js"

RUN mkdir /app
WORKDIR /app
ENV NODE_ENV="production"

COPY package.json package-lock.json ./
RUN npm install
##########
FROM base as builder

COPY . .
RUN npm run build && rm -rf node_modules
COPY --link package.json package-lock.json ./
RUN npm ci --include=dev

##########
COPY --link . .
RUN npm run build

FROM node:20
LABEL fly_launch_runtime="nodejs"
RUN rm -rf node_modules

WORKDIR /app
ENV NODE_ENV production
##########
FROM base

COPY --from=builder /app /app
RUN npm install
RUN npm ci

EXPOSE 8080
CMD [ "npm", "run", "start" ]
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The main goals of this repo:
1. create a (simple, but capable) service/bot to monitor game servers
1. get gamedig & steam api server info (_eg.: server name, map, players, etc._)
1. relay real time server information to various channels via APIs (_eg.: discord, telegram, slack etc._)
1. should be able to host on a free service (_target atm. is fly.io (node.js 18)_)
1. should be able to host on a free service (_target atm. is fly.io (node.js 20)_)
1. graciously add more features based on community feedback via [discord <img src="https://cdn.discordapp.com/icons/935911764023996527/1b791c9533f24a6bc23dbf5b2c134436.png?size=20" width="20" align="absmiddle" title="ACME Corp." alt="">](https://discord.gg/4tsbftsGJz) and [github :octocat:](https://github.com/a-sync/game-server-watcher/discussions/new?category=ideas-requests)

# Screenshots
Expand Down Expand Up @@ -111,7 +111,8 @@ _The bot has no cleanup functionality, leftover messages must be removed manuall

# 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).
The latest Pterodactyl egg can always be found here: [🥚](https://raw.githubusercontent.com/a-sync/game-server-watcher/master/egg.json)
The latest Pterodactyl egg can always be found here: [🥚](https://raw.githubusercontent.com/a-sync/game-server-watcher/master/egg.json)
Pre-built container images can be downloaded from the github container registry: `docker pull ghcr.io/a-sync/game-server-watcher`
<p align="center">
<!--<a href="https://app.koyeb.com/deploy?type=git&repository=github.com/a-sync/game-server-watcher&branch=master&name=gsw"><img src="https://www.koyeb.com/static/images/deploy/button.svg" height="32" alt="Deploy to Koyeb"></a>//TODO: support ephemeral storage-->
<!--<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-->
Expand Down
2 changes: 1 addition & 1 deletion azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"variables": {
"sku": "Basic",
"skuCode": "B1",
"linuxFxVersion": "NODE|16-lts",
"linuxFxVersion": "NODE|18-lts",
"hostingPlanName": "[format('AppServicePlan-{0}', parameters('siteName'))]"
},
"resources": [
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "game-server-watcher",
"version": "3.1.10",
"version": "3.1.11",
"description": "A simple discord/telegram/slack bot that can be hosted on a free service to monitor your game servers and players in style. 😎",
"exports": "./dist/server.js",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion public/jsoneditor.js

Large diffs are not rendered by default.

0 comments on commit 8114cc9

Please sign in to comment.