a minimalistic scoreboard
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
emile 896380e65f
fixed typo
2 weeks ago
config initial commit 2 weeks ago
hosted/tmpl initial commit 2 weeks ago
src initial commit 2 weeks ago
Dockerfile initial commit 2 weeks ago
README.md fixed typo 2 weeks ago
docker-compose.yml updated config location 2 weeks ago
go.mod initial commit 2 weeks ago
go.sum initial commit 2 weeks ago
test.sh initial commit 2 weeks ago

README.md

scoreboard

This is the scoreboard service used by the players to enter their flags, recieving points if the flag is valid.

The scoreboard takes all scores into account when calculating the individual teams scores, using the following function for the dynamic scoring:

value = (((minimum - maximum)/(decay ** 2)) * (solves ** 2)) + maximum
  • minimum is the amount of points the challenge is “worth” after “decay” teams have solved it
  • maximum is the initial value of the challenge
  • solves is defined as the amount of solves a single challenge has got
  • decay defines how many teams have to solve the challenge until it’s value is minimum

Usage

Dev

  1. Start postgres: docker-compose up -d postgres.
  2. Start the server: go run ./...
  3. Profit! (visit http://127.0.0.1:8000).

(You might want to adjust the db.delete_on_start value in the config in order to wipe the database on each start).

Prod

  1. ADJUST THE PASSWORDS IN THE CONFIG: $EDITOR config/config.yml.
  2. ADJUST THE db.delete_on_start option in the config: $EDITOR config/config.yml.
  3. Start postgres: docker-compose up -d postgres.
  4. Start the scoreboard: docker-compose up -d scoreboard.
  5. The scoreboard is now running on 0.0.0.0:8000, you might want to do magic foo with this so it is reachable somewhere.

FAQ

Why is the config.yml file in config/ ?

viper does weird stuff:

“The reason this happens is that viper sets a watch on the directory containing the file, not the file itself. In my case the solution was to mount the config directory instead of the file, but this won’t work for everyone.” #920