Code Monkey home page Code Monkey logo

iscoj-tioj-old's Introduction

Installation guide

Direct installation

Make sure the current user has sudo privileges, and run the installation script:

curl -sSL https://raw.githubusercontent.com/TIOJ-INFOR-Online-Judge/tioj/main/scripts/install.sh | DB_PASSWORD=some_password bash -s

It is recommended to run this script on a freshly-installed machine. This script will install both the web server (by passenger-install-nginx-module) and the judge client, and start & enable them via systemd.

The systemd service names are nginx.service and tioj-judge.service. The configuration files are located at /opt/nginx/conf and /etc/tioj-judge.conf. You can modify them and reload/restart the services.

If password recovery is needed, setup the settings file after the installation is completed, or pass the SMTP_* and MAIL_* environment variables to bash just like those in .env.example.

This script is tested on Ubuntu 20.04 LTS and 22.04 LTS. It also works on Arch Linux, but direct installation on Arch Linux is not recommended since it involves rebuilding some community packages for static libraries.

It is strongly recommended to mount tmpfs on /tmp by adding tmpfs /tmp tmpfs rw,nosuid,nodev in /etc/fstab.

Docker

  1. Install docker-compose and setup .env using the format of .env.example.
    • The SMTP_* and MAIL_* variables are only added if password recovery function is needed. Without them, the function is automatically disabled.
  2. docker-compose up -d and enjoy TIOJ on port 4000.

Settings

If password recovery and/or Sentry monitoring is needed, setup config/settings.yml using the format of config/settings.yml.example. The old method of using rails credentials:edit is deprecated.

Judge Management

TIOJ has an admin control panel located at /admin (powered by Active Admin), which has an independent authentication system. The default admin username and password are both admin (set in db/seeds.rb and created when running rails db:seed).

Though one can add/edit some settings through the control panel, it is not the recommended way to manage the judge (and it might lead to some errors). Instead, one should create an ordinary account, enter the Users tab in the control panel to set the account as an admin account, and use it to do all ordinary management such as problem setting, testdata uploading, and article creation.

It is possible to have multiple judge clients by setting up the fetch keys in the Judge Servers tab in the control panel.

iscoj-tioj-old's People

Contributors

adrien1018 avatar silverneko avatar joshua5201 avatar cschenio avatar brianbbsu avatar edisonhello avatar aaronwu-train avatar ototot avatar omeletwithoutegg avatar leo900807 avatar willypillow avatar lic225 avatar

Stargazers

807 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.