Skip to content

Repository files navigation

CUP Online Judge

License GitHub package.json version (branch) GitHub package.json version (branch) jsDelivr hits (GitHub)

name pulls version layers image size
ryanlee2014/cupoj-backend Pulls Count GitHub release (latest by date) Layers image size
ryanlee2014/cupoj-websocket Pulls Count GitHub release (latest by date) Layers image size
ryanlee2014/cupoj-judger Pulls Count GitHub release (latest by date) Layers image size
ryanlee2014/cupoj-language-server Pulls Count GitHub release (latest by date) Layers image size
ryanlee2014/cupoj-frontend GitHub commit activity GitHub release (latest by date) GitHub repo size
metowolf/nginx Pulls Count GitHub release (latest by date)
mysql/mysql-server Pulls Count
library/redis Pulls Count

Translation

中文

Requirements

Install Docker and Docker Compose

Manual

Build args used by Dockerfiles

  • JUDGER_REPO (default: https://github.com/CUP-ACM-Programming-Club/CUP-Online-Judge-Judger.git)
  • JUDGER_REF (default: master)
  • DAEMON_REPO (default: https://github.com/ryanlee2014/CUP-Online-Judge-Judge-Daemon-Service.git)
  • DAEMON_REF (default: master)
  • NODE_MAJOR (default: 24 22 20 18 16 14)
  • NODE_MAJOR_LIST (alias of NODE_MAJOR, retained for compatibility)
  • NODE_MAJOR/NODE_MAJOR_LIST are tried from left to right in build; the first Node major that can install and pass npm run build:main -- --skipLibCheck is used.
  • KOTLIN_NATIVE_VERSION / KOTLIN_NATIVE_SHA256
  • KOTLIN_COMPILER_VERSION / KOTLIN_COMPILER_SHA256

Build strategy and reproducibility

All build args can be overridden in CI or local docker build commands to pin external inputs when needed.
Recommended pattern for a pinned release: --build-arg JUDGER_REF=<commit_sha> --build-arg DAEMON_REF=<commit_sha> --build-arg NODE_MAJOR="24 22 20 18 16 14" --build-arg KOTLIN_NATIVE_SHA256=<sha256> --build-arg KOTLIN_COMPILER_SHA256=<sha256>

The KOTLIN_*_SHA256 arguments are optional. Set them when you need deterministic artifacts; otherwise build still follows latest compatible upstream releases.

When to pin versions

  • CI rollback / reproducible release: pin *_REF and both KOTLIN_*_SHA256.
  • Build failures introduced by upstream changes: pin NODE_MAJOR/NODE_MAJOR_LIST, NODEJS_SHA256, and git refs before rerunning.
  • Cross-region or air-gapped reproducibility: pin KOTLIN_NATIVE_VERSION and KOTLIN_COMPILER_VERSION explicitly to avoid transient metadata changes.

Usage(all in one)

./init-env.sh

Update(all in one)

./update.sh

Usage(Manual Installation Guide)

  1. Clone repo inside your project
git clone --recursive https://github.com/ryanlee2014/CUP-Online-Judge-NG-Docker-Judger.git docker-judger
  1. Enter the folder and rename .env.example to .env, docker-compose.example.yml to docker-compose.yml
cd docker-judger
cp .env.example .env
cp docker-compose.example.xml docker.compose.yml
  1. Enter the backend folder and rename config.sample.json to config.json
cd etc/backend
cp config.sample.json config.json
  1. Enter the judge folder and rename config.sample.json to config.json Edit judger/etc/config.json and compile.json to your environment settings
# judge.conf
cd judge/etc
cp config.sample.json config.json
  1. Make data foler and move files into the folder or link data folder to judge/data
# make dir
mkdir -p ./judger/data
# link
ln -s path/to/data ./judger/data
  1. Run your containers:
docker-compose up -d

Supporting CUP Online Judge

Become a sponsor on afdian (Alipay only)

About

Open source online judge based on Vue, Express.js and Docker. | CUP ACM/ICPC Online Judge | 中国石油大学(北京) Online Judge

Topics

Resources

Stars

18 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages