Merge branch 'master' into feature/environment-http-port

This commit is contained in:
Jack Stupple 2022-02-21 08:13:42 +00:00
commit c46ef1a831
4 changed files with 33 additions and 3 deletions

27
.github/workflows/docker-image.yml vendored Normal file
View file

@ -0,0 +1,27 @@
name: Docker Image CI
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Publish Docker Image
# You may pin to the exact commit or the version.
# uses: elgohr/Publish-Docker-Github-Action@191af57e15535d28b83589e3b5f0c31e76aa8733
uses: elgohr/Publish-Docker-Github-Action@3.04
with:
# The name of the image you would like to push
name: surdaft/minecraft-exporter
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
# for testing
world

View file

@ -1,7 +1,8 @@
version: '3.1'
services:
minecraft-exporter:
image: 'joshi425/minecraft_exporter'
build:
context: .
environment:
RCON_HOST:
RCON_PORT:
@ -9,4 +10,4 @@ services:
ports:
- 9700:8000
volumes:
- /path/to/minecraft/world:/world:ro
- ./world:/world:ro

View file

@ -271,7 +271,7 @@ class MinecraftCollector(object):
damage_taken.add_sample('damage_taken',value=value,labels={'player':name})
elif stat == "minecraft:damage_dealt":
damage_dealt.add_sample('damage_dealt',value=value,labels={'player':name})
elif stat == "minecraft:play_one_minute":
elif stat == "minecraft:play_time":
player_playtime.add_sample('player_playtime',value=value,labels={'player':name})
elif stat == "minecraft:walk_one_cm":
cm_traveled.add_sample("cm_traveled",value=value,labels={'player':name,'method':"walking"})