(For version 1, please visit here)
Currently Not available
- Built on Docker -- One click Deployment
- Single Page Application -- Better User Experience
- Support multiple cases of test data
Note: This project is still during BETA stage
- clone this project
git clone https://github.com/acm309/PutongOJ.git PutongOJ- compose up
docker-compose upor
daemon mode
docker-compose up -dIt will listen on 80 ports after it is successfully deployed. Then you can directly visit this platform.
Enjoy it!
Ubuntu is recommended. You can deploy this platform on other linux, but I can't ensure it must work.
apt-get install libcairo2-dev libpango1.0-dev build-essential- clone this repo
git clone https://github.com/acm309/PutongOJ.git- install project dependencies
npm i -g yarn
yarn- setup database connections
export variables
export redisURL='your redis url'
export dbURL='your mongodb url'update config/index.js
const prod = {
port: 3000 // the port the application will listen on
}- setup static files and judger
node manager.jspm2.config.json would be generated.
- start
install pm2 first
npm i -g pm2then start with pm2
pm2 start pm2.config.jsonKnow the Container Id of the mongodb container by running:
docker psReplace <Container id> with the real id of your running mongodb container
docker exec -it <Container id> mongodump --out /data/backup --db ojThe output data will be stored at migrations/backup/
docker exec -it <Container Id> mongorestore --db oj --drop /data/backup/ojcopy files to public folder
Replace <Container id> with the real id of your running oj container
docker cp <SRC_PATH> <Container Id>:/app/public- IE: NOT recommended
- Chrome: 50 or above is recommended
- Firefox: 50 or above is recommended
- Edge: recommended