Skip to content

Provides a Docker-Compose cfg for the screeps-launcher. And several Scripts to create/delete Cloud-Instances

Notifications You must be signed in to change notification settings

Kaimodo/Screeps-launcher-Docker-compose-grafana

Repository files navigation

Screeps-launcher-Docker-compose-grafana

Tested on Docker-desktop(Win), Docker(Ubuntu20) and Azure(Cloud) | WIP Cloud-Scripts 4 GCE and AWS

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

i found a different one here

(OPTIONAL) Setup Azure-Server instructions

(OPTIONAL) Setup AWS-Server instructions

(OPTIONAL) Setup GCE-Server instructions WIP - Not working atm

If u need to install Docker & compose look here

Installation steps

Your working folder is now server/

  • 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
  • Copy the folder server and rename it to whatever you want, it will be the base folder of your server.
  • run docker-compose up -d in that folder 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

Provides a Docker-Compose cfg for the screeps-launcher. And several Scripts to create/delete Cloud-Instances

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published