A Django scoreboard for CTF
docker build -t registry.insecurity-insa.fr/insecurity/scoreboard -f deploy/Dockerfile .
$ 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
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
docker run --rm -it --cpu-period="100000" --cpu-quota="95000" --name scoreboard -p 80:8081 registry.insecurity-insa.fr/insecurity/scoreboard
docker exec -u 0 -it scoreboard bash