DOMJudge Docker Deployment made easy for ubuntu distro.
There are two ways how to setup domjudge docker
Basic setup needs you to install the docker already in the VM that you intend to host as the domserver and judgehost. It expects you to already enable cgroupv2
- Clone this repository
https://github.com/bccfilkom-cp/domjudge-docker.git #https
git@github.com:bccfilkom-cp/domjudge-docker.git #ssh
- Copy the environment files
cp .env.example .env
cp .db.env.example .db.env
-
Configure the environment variables in those files
-
Make the shell script to be executeable by running this command
chmod +x prepare-contest-env.sh
-
Fill needed variables in the shell script
-
Run the shell script
./prepare-contest-env.sh
With ansible, everything is fast to the moon and it's all automated. Ansible setup also takes care docker installation and enable cgroup for you! Note that ansible expects your VM OS to be ubuntu.
- Make the ansible setup script to be executeable
chmod +x ansible-setup.sh
- Fill needed variables in inventory files including hosts and vars
- Run the ansible setup script
./ansible-setup.sh
- If you just need to clone and deploy without installing the docker, you can run deploy playbook
cd ansible
ansible-playbook -e @inventory/vars.yaml playbooks/deploy.yml
- SSH to your VM and go to
~/domjudge-docker/output.txt
to see the shell process result. You can also find the admin password in the file. Make sure to delete the file after.
To spawn Judgehost containers in different host than the DOMserver host, you can look up start-judgehost.sh shell script, fill the needed variables and execute it in your local machine or separate machine than the DOMserver machine.
Please read this notes for further information regarding to deploy DOMJudge docker.
-
Use
host.docker.internal
asDOMSERVER_IP_ADDR
in shell script if you want to run the judgehost in the same host as the domserver -
If the judgehost is running on different host than the domserver, then you can't instantly run the shell script since the script expects you to run judgehost on the same host as the domserver.
-
If judgehost failed to start and the judgehost container logs said auth failed, then you need to change judgehost account password in domjudge jury interface and restart the judgehost container
-
To reset admin's password, you can execute the bellow command
docker exec -it domjudge-srv /opt/domjudge/domserver/webapp/bin/console domjudge:reset-user-password admin
This project is licensed under the MIT License. See the LICENSE
file for details.