Skip to content

Instantly share code, notes, and snippets.

@circleous
Created Oct 4, 2021
Embed
What would you like to do?
domjudge docker-compose
MYSQL_ROOT_PASSWORD=CHANGE_ME_PLS
MYSQL_PASSWORD=CHANGE_ME_PLS
MYSQL_USER=domjudge
MYSQL_DATABASE=domjudge
MYSQL_HOST=db
CONTAINER_TIMEZONE=Asia/Jakarta
JUDGEDAEMON_PASSWORD_FILE=/judgehost_password

domjudge

  1. Make sure you're cgroups v1. Some distros are using cgroups v2 by default.
  2. start service
docker-compose up
  1. copy initial admin password, used for admin login, save it
docker-compose exec domserver cat /opt/domjudge/domserver/etc/initial_admin_password.secret
  1. get restapi password, used for registering judgehost, copy password to judgehost_password file
docker-compose exec domserver cat /opt/domjudge/domserver/etc/restapi.secret
  1. CTRL+C (exit docker) and restart again, wait until all running. Required for judgedaemon so that it can register it self to domserver.
docker-compose up -d

Important Notice

change db password in .env

Increase judgedaemon services

You can do it by copy the judgeN services and paste under the last judgeN service. change DAEMON_ID and service name accordingly.

version: '3'
services:
db:
image: mariadb:10
env_file: .env
volumes:
- db-data:/var/lib/mysql
networks:
- backend
command: --max-connections=1000
domserver:
image: domjudge/domserver:latest
env_file: .env
ports:
- "9000:80"
depends_on:
- db
networks:
- judgenet
- backend
judge0:
image: domjudge/judgehost:latest
hostname: judgedaemon-0
privileged: true
env_file: .env
restart: on-failure
environment:
- DAEMON_ID=0
volumes:
- ./judgehost_password:/judgehost_password
- /sys/fs/cgroup:/sys/fs/cgroup:ro
networks:
- judgenet
depends_on:
- domserver
judge1:
image: domjudge/judgehost:latest
hostname: judgedaemon-1
privileged: true
env_file: .env
restart: on-failure
environment:
- DAEMON_ID=1
volumes:
- ./judgehost_password:/judgehost_password
- /sys/fs/cgroup:/sys/fs/cgroup:ro
networks:
- judgenet
depends_on:
- domserver
judge2:
image: domjudge/judgehost:latest
hostname: judgedaemon-2
privileged: true
env_file: .env
restart: on-failure
environment:
- DAEMON_ID=2
volumes:
- ./judgehost_password:/judgehost_password
- /sys/fs/cgroup:/sys/fs/cgroup:ro
networks:
- judgenet
depends_on:
- domserver
volumes:
db-data:
networks:
judgenet:
backend:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment