-
Notifications
You must be signed in to change notification settings - Fork 6
Install SchOJ
- Install Docker and docker-compose.
- Clone (or download the zip of) this repository.
- If you are cloning, run:
git pull --recurse-submodules
git submodule init
git submodule update --remote --recursive
-
If you are downloading the zip, download dmoj-judge and dmoj-site, then extract them to
build/judge
andbuild/site
. Make sure there is oneDockerfile
each inbuild/site/Dockerfile
andbuild/judge/Dockerfile
. -
Decide what branch you want to use:
For
judge
, we support several basic languages. If you want some more languages, rungit checkout multilang
atbuild/judge
. Notice that themultilang
branch may be not up to date. Also, remove the language packages you do not want to use, or the image would be huge (about 7GB)! Details -
Change the configurations of dmoj-judge (tutorial) and dmoj-site (tutorial, only the part of
Dockerfile
andlocal_settings.py
). -
Run
docker-compose build
. -
Run
docker-compose up -d
. -
Check everything is working fine.
The first time run will initialize and migrate the database. You can stop the servers with
Ctrl-C
when the site is ready, for example, if:- You can see the site page with the browser (like visiting http://127.0.0.1/)
- You see
WSGI app 0 (mountpoint='') ready in ...
in the log. - You see
Authentication as "key" failed on: [site]:9999
in the log (This failure is normal. We need to configure the key on the site before the judge can connect to the site.)
-
Modify the site settings (tutorial, the part of "After the server is running").
-
Add your questions, add your data and enjoy.