A lightweight online evaluation system based on Vue.js and Django
Currently used in Guangdong University of Foreign Studies
sudo apt-get update
sudo apt-get install -y git
sudo apt install docker.io -y
sudo apt install docker-compose -y
git clone https://github.com/Linzecong/LPOJ.git && cd LPOJ
Please modify the database password (all DB_PASSWORD, MYSQL_ROOT_PASSWORD fields) in docker-compose.yml and some settings you think are necessary
Please make sure that ports 4406 8080 8000~8002 9906 on the machine are not occupied!
sudo docker-compose up -d --scale judger=3
The above command turns on 3 question judging machines by default, and you can modify the number by yourself.
Depending on the network speed and configuration, it can be automatically set up in about 10 to 20 minutes without manual intervention.
Wait for the command to be executed, and then run sudo docker ps -a. When you see that the status of all containers is Up, it means that OJ has been started successfully.
After successful installation, first access OJ through IP:8080 and register a user
Then enter IP:8000/admin and log in to the backend with the user name admin and password admin (please change the backend password in time. This backend function is only used to modify administrator permissions, so there is no style)
Modify the User table so that the type of the super user you registered is 3, making the user you registered become a super administrator.
Log in as an administrator, enter the administrator page in the upper right corner, then set the label on the website and submit the settings once
To update OJ, just perform the following steps in the LPOJ directory
git pull # 如果你修改了代码,自行解决merge得到情况
sudo docker-compose stop
sudo docker-compose pull
sudo docker-compose up -d --scale judger=3
The data generated when the container is running will be saved in the corresponding folder, such as database files, question data, etc.
First download the source code
git clone https://github.com/Linzecong/LPOJ.git && cd LPOJ
Then modify the place you want to modify at will. After the modification is completed, use the following command to redeploy
sudo docker-compose -f docker-compose-build.yml up -d --build --scale judger=3
Similarly, you need to modify the configuration in docker-compose-build.yml . For details, see Start the installation.
Since the entire system will be rebuilt instead of pulling the already built image, it will take a longer time ~ please be patient.
The static files of the website can be placed in ./Frontend/dist/img, such as storing images used in questions.
For specific usage, please refer to the usage documentation
3.3 Update the template question function similar to LeetCode
3.4 Update the class management and homework assignment functions, and you can add multiple choice questions in the competition
Or you can visit us directly at oj.lpoj.cn
Modern browsers (chrome, firefox)
The MIT License