Docker compose stack for running the dmoj judge.
- Generate the configuration files for the scripts.
bash setup-judges-config.sh
- Generate the environment files (
.env
) and the aliases.
bash init-judges-files.sh
The default configuration for this command can be changed in the init-judges.conf
file.
- Show the project directory tree to see the new files created
by the
setupenv.sh
script. Using-a
to show hidden files and-I
to ignore the git hidden directory.
tree -a -I .git .
- Load the aliases in the current shell session
source bash_aliases
Or, install the aliases for the current user
cat < bash_aliases >> ~/.bash_aliases
For example, the alias judge1dc
allows the execution of the
docker compose
command in the environment of the judge one.
- Build the judge image. If you want to change the image tag,
modify the environment variable in the
.env
file.
docker compose build --pull
- Run the judge tests.
docker compose run app test
This command runs the available tests for each language run time.
- Define the judge key in the
.env
file for the judge one and review the other environment variables.
nano judge1/.env
- Review the environment variables substitution in the docker compose.
judge1dc config
- Execute the judge, the
-d
option runs it in the background.
judge1dc up -d
- See the logs for the judge, the
-f
option waits for the judge output.
judge1dc logs -f
- Tag the latest image as active.
bash tag-latest-image-as-active.sh
- Recreate the judges to use the latest image.
perl recreate-judges.pl
If a judge is not running, it is starting during this process.