Docker version of AKIOIOJ, the next generation of Online Judge.
Adapt from Vijos/vj4-docker
Start your own AKIOIOJ with Docker in minutes!
git clone https://github.com/Gingmzmzx/akioioj-docker.git
cd akioioj-docker
cp .env.example .env
docker-compose up -d
Wait for seconds for services to be up and running, then you can access your own AKIOIOJ with http://<ip>:8888
.
To add a super administrator:
alias drpm="docker-compose run --rm web"
drpm vj4.model.user add -1 soha 233333 soha@lohu.info # uid username password email
drpm vj4.model.user set_superadmin -1 # uid
To enable judging, you should configure a judge account first:
alias drpm="docker-compose run --rm web"
drpm vj4.model.user add -2 judge 123456 judge@example.org # uid username password email
drpm vj4.model.user set_judge -2 # uid
Then download a example judge configuration file:
mkdir -p ./data/judge/ && wget -O ./data/judge/config.yaml https://raw.githubusercontent.com/Gingmzmzx/jd4/master/examples/config.yaml
# fill account info of judge user you've created before in config.yaml
nano ./data/judge/config.yaml
You can use http://web:8888/
as server_url
in config.yaml
if the web service is listening to port in the container.
Edit docker-compose.yml
and uncomment judge
block and docker-compose down && docker-compose up -d
.
Now your can judge your codes on your AKIOIOJ!