Skip to content

HugoDelval/inshack-scoreboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

inshack-scoreboard

A Django scoreboard for CTF

Build

docker build -t registry.insecurity-insa.fr/insecurity/scoreboard -f deploy/Dockerfile .

Setup the DB on a separate server

$ mysql -uroot -p
mysql> CRATE DATABASE inshack;
mysql> CREATE USER 'inshack'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON inshack.* TO 'inshack'@'localhost';
mysql> exit

Modify inshack_scoreboard/settings.py accordingly. Then launch the migrations on the mysql host:

$ python3 manage.py makemigrations
$ python3 manage.py migrate

Populate DB

echo "from django.contrib.auth.models import User; \
from challenges.models import CTFSettings; \
User.objects.create_superuser('adminctf', '[email protected]', 'CHANGE_ME'); \
CTFSettings.objects.create(url_challenges_state='http://IP_OF_CHALLENGE_MONITORING/')
" | python3 manage.py shell

Run

docker run --rm -it --cpu-period="100000" --cpu-quota="95000" --name scoreboard -p 80:8081 registry.insecurity-insa.fr/insecurity/scoreboard

Login as root

docker exec -u 0 -it scoreboard bash

Releases

No releases published

Packages

No packages published