Merge branch 'master' into feature/environment-http-port
This commit is contained in:
commit
c46ef1a831
4 changed files with 33 additions and 3 deletions
27
.github/workflows/docker-image.yml
vendored
Normal file
27
.github/workflows/docker-image.yml
vendored
Normal 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
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# for testing
|
||||||
|
world
|
|
@ -1,7 +1,8 @@
|
||||||
version: '3.1'
|
version: '3.1'
|
||||||
services:
|
services:
|
||||||
minecraft-exporter:
|
minecraft-exporter:
|
||||||
image: 'joshi425/minecraft_exporter'
|
build:
|
||||||
|
context: .
|
||||||
environment:
|
environment:
|
||||||
RCON_HOST:
|
RCON_HOST:
|
||||||
RCON_PORT:
|
RCON_PORT:
|
||||||
|
@ -9,4 +10,4 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 9700:8000
|
- 9700:8000
|
||||||
volumes:
|
volumes:
|
||||||
- /path/to/minecraft/world:/world:ro
|
- ./world:/world:ro
|
||||||
|
|
|
@ -271,7 +271,7 @@ class MinecraftCollector(object):
|
||||||
damage_taken.add_sample('damage_taken',value=value,labels={'player':name})
|
damage_taken.add_sample('damage_taken',value=value,labels={'player':name})
|
||||||
elif stat == "minecraft:damage_dealt":
|
elif stat == "minecraft:damage_dealt":
|
||||||
damage_dealt.add_sample('damage_dealt',value=value,labels={'player':name})
|
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})
|
player_playtime.add_sample('player_playtime',value=value,labels={'player':name})
|
||||||
elif stat == "minecraft:walk_one_cm":
|
elif stat == "minecraft:walk_one_cm":
|
||||||
cm_traveled.add_sample("cm_traveled",value=value,labels={'player':name,'method':"walking"})
|
cm_traveled.add_sample("cm_traveled",value=value,labels={'player':name,'method':"walking"})
|
||||||
|
|
Loading…
Reference in a new issue