AIForces is an online judge for gaming AI competitions. It's written in Ruby. It has a separated multithreaded judging system - AIForces Judge.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
This application requires:
Ruby 2.6.1Rails 5.2.2Bundler 2 or greaterPostgresql 11.2Redislibpq-devnodejs
Also, you need to install all the necessary gems by running
bundle- Clone this repository to your local computer.
git clone https://github.com/aalekseevx/AIforces.git- Satisfy all the prerequisites.
- Create the database
rails db:create
rails db:schema:load- Install and run AIForces Judge on the same computer.
- Now, run AIForces
rails startTODO: describe the tests
These steps will help you to configure Capistrano, so that it could deploy an app to your remote server.
- Clone this repository to your local computer.
git clone https://github.com/aalekseevx/AIforces.git- Satisfy all the prerequisites on the remote server and on the local machine.
- Change Capistrano settings, like server ip and ssh port, in config/deploy.rb file.
- Add server ssh keys to github
- Generate ssh keys on your local machine and add them to authorized_keys on your remote server.
- Create a user and a database and set them in config/database.yml on your remote server.
- Generate new master key and encrypted credentials.
- Move your master key to apps/AIForces/shared/config folder on your server.
- Create AIforces_production database.
- Run initial deploy from your local machine.
capistrano deploy:initial- Configure your web server as a reverse proxy.
- Follow the instructions to deploy AIForces Judge. It is preferred to use another machine in the same network. You can deploy as many judges, as much power you need.
- Add judges endpoints to AIForces Settings. Use:
rails console production
Setting.judges_endpoints = %w[http://127.0.0.1:3001/judge]
Setting.trusted_ips = %w[127.0.0.1]However, these values are set by default.
Now everything is set.
- Ruby On Rails - Web Framework
- Postgresql - Database management system
- Bulma - CSS Framework
- Capistrano - Automated deployment
- Aleksandr Alekseev (aalekseevx) - Rails and Web Design
- Nikolay Rulev (AbsoluteNikola) - Multithreaded judging system
This project is licensed under the MIT License - see the LICENSE.md file for details
- Thanks to Dmitry Chernyshev and Danil Doroshin (ddddanil) for the inspiration and some useful advice.
