Skip to content

FutureAstroMiner/Screeps-launcher-Docker-compose-grafana

 
 

Repository files navigation

Screeps-launcher-Docker-compose-grafana

Tested on Docker-desktop(Win), Docker(Ubuntu20) and Azure(Cloud)

The example-dash and the stats.js are NOT from screeps-grafana

i found a different one here

(OPTIONAL) Setup Azure-Server instructions

If u need to install Docker & compose look here

Installation steps

  • Copy the config.yml.sample and change it to config.yml
  • Edit config.yml and paste in your Steam-api-key. Feel free to change other thinks. If u need help for the config-file go to: [https://github.com/screepers/screeps-launcher]
  • Copy the /cfg/stats_setup.json.sample and change it to /cfg/stats_setup.json
  • Change Username and Password
  • run docker-compose up -d and Wait until it is done starting the docker images and settle on mongo status messages.
  • Open another terminal in that folder. Run docker-compose exec screeps screeps-launcher cli. This is a command-line interface to control your new private server.
  • In the CLI, run system.resetAllData() to initialize the database. Unless you want to poke around, use Ctrl-d or Ctrl-x to exit the cli.
  • Run docker-compose restart screeps to reboot the private server.

Accessing the Server

  • Connect via Steam-client and use Private server tab
  • Host: localhost
  • Port: 21025
  • Server password: <leave blank, unless configured otherwise>

(optional) Change Server password

  • Connect to Cli as described in Installation Steps.
  • Type in setPassword("USER","PASS")

Grafana

Access Grafana at [http://localhost:3000/]. You'll find your stats in the default data source, under screeps.privateserver.

More Info here: screeps-grafana

Usage example

I found a (working) Dashboard and a TS-Class here YOu can find it in the grafana_sample Folder.

Setup Step in Screeps

To call it just

import { StatsManager } from "stats-manager.ts";

in your main.ts(js) and run

StatsManager.runForAllRooms();

at the end of your Loop.

Setup Step in Grafana

Import newDash.json as a new DashBoard and all should be working.

Adding Grafana Plugins

Just run docker-compose exec grafana grafana-cli plugins install grafana-clock-panel to install the plugins, then docker-compose restart grafana to apply. Refresh your browser and voila!

Additional Plugins can be found here.

When i missed to ref someone, just tell me.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 43.8%
  • PowerShell 30.7%
  • TypeScript 22.4%
  • Dockerfile 3.1%