{"id":20882719,"url":"https://github.com/ochko/prudge","last_synced_at":"2025-05-12T18:31:07.713Z","repository":{"id":501570,"uuid":"128672","full_name":"ochko/prudge","owner":"ochko","description":"Online judge for programming problems","archived":false,"fork":false,"pushed_at":"2024-05-11T06:50:17.000Z","size":6173,"stargazers_count":29,"open_issues_count":4,"forks_count":14,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-01T09:05:15.179Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://coder.mn","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ochko.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2009-02-14T04:06:30.000Z","updated_at":"2024-05-11T06:49:36.000Z","dependencies_parsed_at":"2024-11-18T07:34:35.962Z","dependency_job_id":"88278e55-203b-4164-ba32-b42b94f35744","html_url":"https://github.com/ochko/prudge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ochko%2Fprudge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ochko%2Fprudge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ochko%2Fprudge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ochko%2Fprudge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ochko","download_url":"https://codeload.github.com/ochko/prudge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253797974,"owners_count":21965984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T07:33:10.583Z","updated_at":"2025-05-12T18:31:06.830Z","avatar_url":"https://github.com/ochko.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prudge\n[![Build Status](https://travis-ci.org/ochko/prudge.png?branch=master)](https://travis-ci.org/ochko/prudge)\n[![Code Climate](https://codeclimate.com/github/ochko/prudge.png)](https://codeclimate.com/github/ochko/prudge)\n[![Coverage Status](https://coveralls.io/repos/ochko/prudge/badge.png?branch=master)](https://coveralls.io/r/ochko/prudge?branch=master)\n[![Dependency Status](https://gemnasium.com/ochko/prudge.png)](https://gemnasium.com/ochko/prudge)\n\nPrudge is an online programming contest judge system.\n\n# Installing\n\nOn your local development machine checkout the source. Of course you'll need ruby.\n\n* `git clone git://github.com/ochko/prudge.git`\n* `cd prudge`\n* `bundle install`\n\nThere are two ways to install prudge -- Ansible or Manual.\n\n## Install using Ansible\n\nInstall [ansible](http://docs.ansible.com/intro_installation.html) on your local machine.\nInstall sudo and python on your server. Ensure you have an ssh access to your server, and able to run commands as a root.\nCustomize `setup/vars/common.yml`. Generate password hash with `$ mkpasswd --method=SHA-512` for `prudge_user_pwd`.\nModify `setup/server.info` file with your own server's hostname.\n\nAnd run this command replacing `yourlogin` with your ssh user's login:\n```\n$ cd setup\n$ ansible-playbook -i server.info -u yourlogin --become --ask-become-pass site.yml --extra-vars \"user=yourlogin\"\n```\n\n### Troubleshooting\n\nIf you got `/usr/bin/python: not found` error then set python interpreter like:\n```\nansible-playbook -i server.info -u yourlogin --become --ask-become-pass site.yml -e \"user=yourlogin\" -e \"ansible_python_interpreter=/usr/local/bin/python2\"\n```\n\n\n## Manual install\n\nYou can install prudge manually if ansible playbook is not available for your platform or simply you don't want to use ansible.\n\n### Dependencies\n\nDuring manual installation you'll install and configure these services for prudge.\n\n* Memcached for caching\n* Redis for background processing\n* Sphinx for full text search\n* Postgresql as database\n* Git for getting source codes\n* [safeexec](https://github.com/ochko/safeexec)\n\n### Configuration files\n\nCreate a directory on your server. Lets say `/usr/local/apps/prudge`. Then create subdirectories:\n\n```\n/usr/local/apps/prudge/shared/config\n/usr/local/apps/prudge/shared/script\n\n```\n\nCopy configuration files from `config/examples`.\nCopy scripts from `setup/templates/script` removing `.j2` from filenames. Replace chunks like `{{ ... }}` with appropriate value.\nThese shared files will be linked to application directory when you deploy.\n\n### Ruby\n\nInstall ruby via [rbenv](https://github.com/sstephenson/rbenv).\nWhen your rbenv and ruby-build is ready do:\n\n* `$ rbenv install 1.9.3-p551` or whatever ruby version specified in `.ruby-version` file.\n* `gem install bundler`\n\n### Database\n\nInstall postgresql. And create user and database. Update database configuration in `config/database.yml`.\n\n### Sphinx\n* `cp config/examples/sphinx.yml config/sphinx.yml`\n* See [Sphinx docs](http://sphinxsearch.com/docs/current.html) for additional configuration.\n\n### Safeexec\n\nPrudge uses [safeexec](https://github.com/ochko/safeexec) for running user programs. You'll need `cmake` to build safeexec and also need root permission(sudo) to install it.\n\n* `git clone https://github.com/ochko/safeexec.git \u0026\u0026 cd safeexec`\n* `cmake . \u0026\u0026 sudo make install`.\n* Now your should have a binary called `safeexec` -- `which safeexec`. Update `runner` path in `config/binaries.yml`.\n\n### Resque\n\nPrudge uses [resque](https://github.com/resque/resque) for background tasks such as checking submitted solutions, notifying users etc.\nResque uses redis, so install redis and start it. Then run resque workers:\n\n`nohup bundle exec rake resque:work RAILS_ENV=production QUEUE=* PIDFILE=tmp/pids/resque.pid \u003e log/resque.log 2\u003e\u00261 \u0026`\n\n### Binary executables\n\nPrudge uses some external binaries -- safeexec, git and diff. Configure those in `config/binaries.yml`. Use `which` if don't know where is a binary, e.g `which safeexec`.\n\n### Mail delivery\n\nPrudge needs to send emails for resetting forgotten password, notifying new contest announcement etc. Configure mail delivery settings in `config/mail.yml`.\nSee [Action Mailer docs](http://guides.rubyonrails.org/action_mailer_basics.html#example-action-mailer-configuration) for detail.\n\n## Deploying\n\nPrudge uses [capistrano](http://capistranorb.com) for deployments.\n\n* `cp config/deploy/example.rb config/deploy/production.rb`. And update `production.rb` with your server's info.\n* `bundle exec cap production deploy`\n* `bundle exec cap production deploy:seed`\n* `bundle exec cap production deploy:ts:index`\n* `bundle exec cap production deploy:monit`\n\nYou'll need to run `deploy:seed` task only once on your first deploy. Seeding creates minimal database records. See `db/seeds.rb` for details.\n\n## Web server\n\nIt is time to open your shiny new site to the world. Install nginx. Put contents of `setup/templates/web/nginx.conf.j2` into `nginx/sites-available/prudge.conf`. Replace all `{% ... %}` and `{{ ... }}` with desired values.\n\n## Localization\n\nWant to run prudge in different language? Change `default_locale` in `config/config.yml`.\nIf your language isn't available yet look into `config/locales` directory and create localizations for your language.\n\n## Contributing\n\nSee [Technical Debts](https://github.com/ochko/prudge/blob/master/TechDebt.md) or [Open Issues](https://github.com/ochko/prudge/issues).\n* After making changes add spec, and please be sure that all specs pass\n* Send me pull request. Then it could be merged ;)\n* If you found any problems please report on [issues](https://github.com/ochko/prudge/issues) page. But don't post any security related issues there, send them privately.\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) Lkhagva Ochirkhuyag, 2009-2015\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fochko%2Fprudge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fochko%2Fprudge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fochko%2Fprudge/lists"}