Main modules are available below:
- Backend(Django): https://github.com/dAiv-CNU/OnlineJudge
- Frontend(Vue): https://github.com/dAiv-CNU/OnlineJudgeFE
- Judger Sandbox(Seccomp): https://github.com/dAiv-CNU/Judger
- JudgeServer(A wrapper for Judger): https://github.com/dAiv-CNU/JudgeServer
- System: Ubuntu 18.04 LTS
-
Install the necessary dependencies
sudo apt-get update sudo apt-get install -y vim python3-pip curl git sudo pip3 install --upgrade pip sudo pip3 install docker-compose
-
Install Docker
Install using script:
sudo curl -sSL get.docker.com | sh
Other installation methods: https://docs.docker.com/install/
-
Please select a location with some surplus disk space and run the following command:
git clone -b 2.0 https://github.com/dAiv-CNU/OnlineJudgeDeploy.git deploy sudo ln -rs deploy ./Desktop/deploy cd deploy
-
Build custom docker images (if needed)
git clone https://github.com/dAiv-CNU/OnlineJudge.git backend sudo docker buildx build ./backend -t oj-image/backend --load
-
Start service containers
sudo docker compose up -d
-
Check status
sudo docker ps -a
According to the network speed, the setup can be completed automatically in about 5 to 30 minutes without manual intervention.
Wait for the command execution to complete, and then run docker ps -a
. When you see that the status of all the containers does not have unhealthy
or Exited (x) xxx
, it means OnlineJudge has started successfully.
Access the server's HTTP 80 port or HTTPS 443 port through a browser, and you can start using it. The background management path is /admin
, the super administrator user name automatically added during the installation process is root
, and the password is rootroot
. If you log in successfully, please change your account password immediately..
Don't forget to read the documentation: http://opensource.qduoj.com/
-
Install Certbot
sudo apt-get install letsencrypt -y
-
Shutdown Global System Nginx
sudo service nginx stop
-
Obtain SSL Certificate
sudo certbot certonly --standalone -d daiv.ddns.net sudo cat /etc/letsencrypt/live/daiv.ddns.net/fullchain.pem
-
Add SSL Settings to Nginx Config
sudo cp ./nginx/default /etc/nginx/sites-available/default
-
Restart Nginx
sudo nginx -t sudo service nginx restart
-
Stop service containers
sudo docker compose down
-
Delete all docker containers and images
sudo docker stop $(sudo docker ps -a -q) sudo docker rm $(sudo docker ps -a -q) sudo docker rmi $(sudo docker images -q)