Giter VIP home page Giter VIP logo

judgesystem's Introduction

judgeSystem

A python/django based system for testing c/c++ solutions to algoritmic problems

##What it does now:

  • Basic Login/register funtionality
  • Task/test editing
  • Testing solutions
  • A simple blog
  • Searching by tags

##Required software:

  • A linux distribution (tested on Arch and Ubuntu)
  • Python 3 (tested with 3.5)
  • Python modules: view requirements.txt
  • g++ compiler
  • A database (postgresql recommended)
  • rabbitmq
  • isolate sandbox

##How to install:

  1. Clone the repository git clone https://github.com/Alaxe/judgesystem.git

  2. (Optional) install virtualenv (guide)

  3. Setup settings judgeSystem/settings.py

    • EMAIL_<setting_name> - Used for account confirmation, default server is gmail
    • RECAPTCHA_PRIVATE_KEY and RECAPTCHA_PUBLIC_KEY - self explanatory, You can get them from their website
    • SITE_HOST the domain / ip of the server; used for some links
    • ALLOWED_HOSTS
    • SECRET_KEY
    • TIME_ZONE
  4. Setup database

    • install it (guide for postgres)
    • Fill in DATABASE in judgeSystem/settings.py
  5. Other dependencies

    • Python modules sudo pip install -r requirements.txt --upgrade
    • Static files python manage.py collectstatic
    • (optinal) create a super user python manage.py createsuperuser
  6. Database migrations

    • Generate any missing migrations python manage.py createmigrations
    • Create the database schema with python manage.py migrate
  7. Install rabbitmq

    • sudo apt-get install rabbitmq
    • Start the service sudo systemctl start rabbitmq-server and enable it sudo systemctl enable rabbitmq-server (i.e. make it start on boot) Note: This assumes that you have systemd. While that's the case with newer distros, you may have to use an your disto's init system
  8. Install isolate

    • Clone the repository git clone https://github.com/ioi/isolate
    • Install make install (Has to be run from the repository's directory)
  9. (optional) Install a proper web server (you can use the development server, which comes with django, but it's not suitable for production) Here's a guide for nginx with uwsgi, a bit out of date though

    • When configuring uwsgi instead of module use wsgi-file and the full path to judgesystem/judgeSystem/wsgi.py
    • Most distros have systemd services so instead of sudo service ... use sudo systemctl (start|restart|stop|enable) (nginx|uwsgi)
  10. (optional) Install celery as a service (systemd)

  • Add to judge-celery.service the full path to the repository
  • Copy the file to create the service sudo cp judge-celery.service /etc/systemd/system/ and reload the services with sudo systemctl daemon-reload
  • Control it with sudo systemctl (start|stop|restart) judge-celery and make it auto-start with sudo systemctl enable judge-celery

##How to run:

  • Web server
    • If you installed a nginx it should be running as a service
    • For the development serverepython manage.py runserver (you can add a url:port pair as a parameter)
  • Celery
    • If you installed the service it should be running
    • Otherwise sudo ./run_celery

judgesystem's People

Contributors

alaxe avatar

Watchers

James Cloos 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.