Skip to content
Sports Event Management at it's finest. Like tuxedo fine
Python HTML CSS Other
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update issue templates Nov 8, 2019
matches
news Un-break tests Nov 19, 2019
olly Add support for backblaze B2 Dec 30, 2019
pages Consolidate static files Nov 27, 2019
profiles create cleaned captcha.html Nov 16, 2019
project-static Consolidate static files Nov 27, 2019
singletournaments remove old tournament templates Oct 12, 2019
staff Allow staff to reset xp for all users (Closes #8) Jan 16, 2020
store remove old store and old support templates Oct 12, 2019
support remove old store and old support templates Oct 12, 2019
teams Clean up html Jan 15, 2020
wagers remove other old static and templates Oct 11, 2019
.all-contributorsrc Merge branch 'master' into all-contributors/add-mikemaddem Nov 8, 2019
.dockerignore .dockerignore initial commit Sep 12, 2018
.gitignore Add settings.py to gitignore Nov 25, 2019
.gitlab-ci.yml Revert "ci build docker images" Aug 12, 2019
.travis.yml
LICENSE
README.md Remove remainder of S3 specific documentation Dec 31, 2019
dockerfile fixed typo in start.sh Sep 12, 2018
manage.py Manage.py init commit Aug 4, 2017
nginx_setup.md Documentation updates (#31) Nov 26, 2019
requirements.txt Add support for backblaze B2 Dec 30, 2019
start.sh Documentation updates (#31) Nov 26, 2019

README.md

Project Olly

Build Status All Contributors

About the project

Project Olly is an online esports tournament hosting platform written in Python 3 using the Django web framework. It began as a closed source commercial product until November 2019 when it was re-released under the MPL2.0 license (see license.md)

Configuration

Copy olly/settings.py.example to olly/settings.py

In olly/settings.py fill in the following fields:

  • SECRET_KEY - This value is used for django's cryptographic signing functions. You can easily generate this by running from django.core.management.utils import get_random_secret_key followed by get_random_secret_key() in a django shell (python manage.py shell)
  • ALLOWED_HOSTS - It is strongly recommended to set this to the domain name of your site to prevent HTTP host header attacks
  • Uncomment the section for either S3 compatible storage or Backblaze B2 storage and fill in the required information
  • EMAIL_HOST - The hostname of your email server (for example smtp.gmail.com)
  • EMAIL_HOST_USER and EMAIL_HOST_PASSWORD - the login information for your email account
  • FROM_EMAIL - The name and email address that will be shown in the "From" field in emails
  • GOOGLE_RECAPTCHA_SECRET_KEY and GOOGLE_RECAPTCHA_SITE_KEY - Authentication information for Google reCAPTCHA
  • DEBUG and PAYPAL_TEST - Set to False
  • DATABASES section - It is highly recommended to use postgresql rather than sqlite for deployment as it has much higher performance. Replace the existing DATABASES section with the one below and edit the information as instructed in the comments
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'mydatabase', # The name of the database (must exist)
        'USER': 'mydatabaseuser', # The username you wish to use to connect to the database
        'PASSWORD': 'mypassword', # The password of the user
        'HOST': '127.0.0.1', # The IP address of the database server. If it is the same server, this can be left as is
        'PORT': '5432', # The port the database server is running on. It is unlikely you will need to change this
    }
}

Installation - without Docker

Not officially supported. It is possible, but we aren't able to assist with the installation if you choose to do so.

  1. Clone the repository! You need the code, it won't just magically work without it.
  2. Install requirements - pip install -r requirements.txt
  3. Configure settings.py
  4. Apply database migrations by running python3 manage.py migrate (assuming your database options are set as you'd like in settings.py)
  5. Create a django admin/super user account - python manage.py createsuperuser and follow the prompts
  6. Give your new superuser account staff panel access by modifying the database row in the profiles_userprofile table - set user_verified to 1 and set user_type to superadmin or admin (hint: you can use django admin at /admin)
  7. Create a StaticInfo object, if you don't every page will throw an error telling you that it can't access the StaticInfo - easiest way to make a staticinfo object is through the django admin at /admin
  8. Setup a web server and reverse proxy using industry standard best practices (hint: gunicorn and nginx work well)

Docker Installation

  1. Clone the repository! You need the code, it won't just magically work without it. (Seems to be a recurring theme)
  2. Create the folder for static files by running sudo mkdir /var/www/static and transfer ownership by running sudo chown www-data:www-data /var/www/static. Feel free to substitute the username, but your reverse proxy must be running as that user
  3. Run docker build . (take note of the image id) followed by docker run -d -v /var/www/static:/static -v /tmp:/sock --net=host -u www-data --name project-olly [your image id]
  4. Setup a reverse proxy of your choice (we highly recommend nginx, and have setup instructions available in nginx_setup.md)
  5. A user was automatically created with the username admin and the password ChangeMe! DON'T FORGET TO CHANGE THE PASSWORD!
  6. How easy was that!?

Designs and Template

Project Olly allows you to throw in your front end templates without having to mess with any backend code! It's simple!

  1. Create a Header & Footer template in pages/templates/sitename (if neccessary)
  2. Create a base.html in pages/templates - make sure to include the header and footer template that you just made

Contributors

Thanks goes to these wonderful people (emoji key):

Mike M.
Mike M.

⚠️ 💻 📖 🤔
Steven Young
Steven Young

🚇 💻 🤔 📖
mulveyben1
mulveyben1

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

You can’t perform that action at this time.