Compare commits
1 Commits
f9a9a37e1a
...
renovate/c
Author | SHA1 | Date | |
---|---|---|---|
a50f13a648 |
4
.babelrc
4
.babelrc
@ -1,3 +1,5 @@
|
|||||||
{
|
{
|
||||||
"plugins": ["@babel/plugin-proposal-class-properties"]
|
"plugins": [
|
||||||
|
"@babel/plugin-proposal-class-properties"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,19 @@
|
|||||||
{
|
{
|
||||||
"parser": "babel-eslint"
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"es6": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"standard"
|
||||||
|
],
|
||||||
|
"globals": {
|
||||||
|
"Atomics": "readonly",
|
||||||
|
"SharedArrayBuffer": "readonly"
|
||||||
|
},
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 2018
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
},
|
||||||
|
"parser": "babel-eslint"
|
||||||
}
|
}
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
name: Publish Docker Image
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- "main"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
docker:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Restore Docker Cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
id: docker-cache
|
|
||||||
with:
|
|
||||||
path: /usr/bin/docker
|
|
||||||
key: ${{ runner.os }}-docker
|
|
||||||
|
|
||||||
- name: Install Docker (if not cached)
|
|
||||||
if: steps.docker-cache.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
wget -q -O /tmp/docker.tgz https://download.docker.com/linux/static/stable/x86_64/docker-20.10.23.tgz \
|
|
||||||
&& tar --extract --file /tmp/docker.tgz --directory /usr/bin --strip-components 1 --no-same-owner docker/docker \
|
|
||||||
&& rm -rf /tmp/* &&
|
|
||||||
echo "Done"
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
|
|
||||||
- name: Login to Repo
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.REPO_USERNAME }}
|
|
||||||
password: ${{ secrets.REPO_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and Push
|
|
||||||
uses: docker/build-push-action@v4
|
|
||||||
with:
|
|
||||||
push: true
|
|
||||||
tags: fascinated/minetrack:latest
|
|
@ -51,7 +51,7 @@ Minetrack can be built and run with Docker from this repository in several ways:
|
|||||||
|
|
||||||
### Build and deploy directly with Docker
|
### Build and deploy directly with Docker
|
||||||
|
|
||||||
```bash
|
```
|
||||||
# build image with name minetrack and tag latest
|
# build image with name minetrack and tag latest
|
||||||
docker build . --tag minetrack:latest
|
docker build . --tag minetrack:latest
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ The published port can be changed by modifying the parameter argument, e.g.:
|
|||||||
|
|
||||||
### Build and deploy with docker-compose
|
### Build and deploy with docker-compose
|
||||||
|
|
||||||
```bash
|
```
|
||||||
# build and start service
|
# build and start service
|
||||||
docker-compose up --build
|
docker-compose up --build
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ docker-compose down
|
|||||||
|
|
||||||
The following configuration enables Nginx to act as reverse proxy for a Minetrack instance that is available at port 8080 on localhost:
|
The following configuration enables Nginx to act as reverse proxy for a Minetrack instance that is available at port 8080 on localhost:
|
||||||
|
|
||||||
```nginx
|
```
|
||||||
server {
|
server {
|
||||||
server_name minetrack.example.net;
|
server_name minetrack.example.net;
|
||||||
listen 80;
|
listen 80;
|
||||||
|
@ -2,18 +2,8 @@
|
|||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Minetrack</title>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
|
|
||||||
<!-- Discord Embed -->
|
|
||||||
<meta content="Minetrack" property="og:title" />
|
|
||||||
<meta
|
|
||||||
content="Tracking minecraft servers since 2023"
|
|
||||||
property="og:description"
|
|
||||||
/>
|
|
||||||
<meta content="https://mc.fascinated.cc/" property="og:url" />
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/main.css" />
|
<link rel="stylesheet" href="../css/main.css" />
|
||||||
|
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;700&display=swap"
|
href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;700&display=swap"
|
||||||
@ -21,7 +11,11 @@
|
|||||||
|
|
||||||
<link rel="icon" type="image/svg+xml" href="../images/logo.svg" />
|
<link rel="icon" type="image/svg+xml" href="../images/logo.svg" />
|
||||||
|
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
|
||||||
<script defer type="module" src="../js/main.js"></script>
|
<script defer type="module" src="../js/main.js"></script>
|
||||||
|
|
||||||
|
<title>Minetrack</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
},
|
},
|
||||||
"rates": {
|
"rates": {
|
||||||
"pingAll": 15000,
|
"pingAll": 15000,
|
||||||
"connectTimeout": 10000
|
"connectTimeout": 2500
|
||||||
},
|
},
|
||||||
"oldPingsCleanup": {
|
"oldPingsCleanup": {
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
|
@ -2,9 +2,7 @@ version: "3"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
minetrack:
|
minetrack:
|
||||||
image: fascinated/minetrack:latest
|
build: https://git.fascinated.cc/Fascinated/Minetrack.git
|
||||||
# or
|
|
||||||
# build: https://git.fascinated.cc/Fascinated/Minetrack.git
|
|
||||||
container_name: minetrack
|
container_name: minetrack
|
||||||
dns:
|
dns:
|
||||||
- 8.8.8.8
|
- 8.8.8.8
|
||||||
|
@ -239,6 +239,7 @@ class Database {
|
|||||||
|
|
||||||
// Record not found
|
// Record not found
|
||||||
if (data[0] === undefined) {
|
if (data[0] === undefined) {
|
||||||
|
// eslint-disable-next-line node/no-callback-literal
|
||||||
callback(false);
|
callback(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -247,6 +248,7 @@ class Database {
|
|||||||
const timestamp = data[0].timestamp;
|
const timestamp = data[0].timestamp;
|
||||||
|
|
||||||
// Allow null player counts and timestamps, the frontend will safely handle them
|
// Allow null player counts and timestamps, the frontend will safely handle them
|
||||||
|
// eslint-disable-next-line node/no-callback-literal
|
||||||
callback(true, playerCount, timestamp);
|
callback(true, playerCount, timestamp);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -270,8 +272,10 @@ class Database {
|
|||||||
// Allow null timestamps, the frontend will safely handle them
|
// Allow null timestamps, the frontend will safely handle them
|
||||||
// This allows insertion of free standing records without a known timestamp
|
// This allows insertion of free standing records without a known timestamp
|
||||||
if (playerCount !== null) {
|
if (playerCount !== null) {
|
||||||
|
// eslint-disable-next-line node/no-callback-literal
|
||||||
callback(true, playerCount, timestamp);
|
callback(true, playerCount, timestamp);
|
||||||
} else {
|
} else {
|
||||||
|
// eslint-disable-next-line node/no-callback-literal
|
||||||
callback(false);
|
callback(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,6 @@ class PingController {
|
|||||||
|
|
||||||
schedule() {
|
schedule() {
|
||||||
setInterval(this.pingAll, config.rates.pingAll);
|
setInterval(this.pingAll, config.rates.pingAll);
|
||||||
// todo: make this a cron job?
|
|
||||||
|
|
||||||
this.pingAll();
|
this.pingAll();
|
||||||
}
|
}
|
||||||
|
6
renovate.json
Normal file
6
renovate.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"local>Fascinated/renovate-config"
|
||||||
|
]
|
||||||
|
}
|
Reference in New Issue
Block a user