Giter Club home page Giter Club logo

mit-tab's Introduction

MIT-Tab

CircleCI codecov Documentation Status

MIT-Tab is a web application to manage APDA debate tournaments.

Looking to learn how to use mit-tab? Check out the docs! It has articles on everything you need to know to run tournaments efficiently. This README is for people who intend to develop features for the software, refer to the documentation linked above for non-development-related information

Local Installation + Running

Currently the installation consists of downloading the code, installing requirements and then manually running the server.

Pre-Requisite: Install MySQL

Instructions for this will vary by platform. On Mac OS X, it comes pre-installed.

Otherwise, check here for Windows and here for Linux

Before running, you need to install MySQL and create a database called mittab

The database login credentials can be configured through the following env vars:

  • MYSQL_USER (default root)
  • MYSQL_PASSWORD (default "", if you use the default make sure you allow empty root passwords in your mysql settings)
  • MITTAB_DB_HOST (default 127.0.0.1, you probably have no need to change this)
  • MITTAB_PORT (default 3306, the default mysql port)

Running the server

git clone <mit-tab repo>
cd mit-tab

# make sure to use python3 for the virtualenv
pip install pipenv
pipenv install

# set-up webpack assets
npm install

# load test data. username: tab password: password
pipenv run python manage.py loaddata testing_db

# Simultaneously runs webpack and the python server
pipenv run ./bin/dev-server

Note: the bin/dev-server script is new and not tested on many set-ups. If you have any issues, you can accomplish the same thing by running:

# build the assets:
/node_modules/.bin/webpack --config webpack.config.js

# ...or, instead, open another terminal tab and watch the
# assets to auto-update with changes
/node_modules/.bin/webpack --config webpack.config.js --watch

# run the Django server:
pipenv run python manage.py runserver

Testing

To run the tests, you will need to have chrome's headless driver installed and in your $PATH. Info here

Optional: Running with Docker

If you'd like, you can also run the application with Docker. The docker configuration is meant to simulate a production server, so it's not ideal for debugging or general development. You must have docker-compose 1.14.0+ installed to run.

To run on localhost Since it uses nginx, it doesn't need a port in the url. Just go to http://localhost

docker-compose build
docker-compose up

# sets up the static files
docker-compose run --rm web ./bin/setup password

Production Setup & Deployment

Deployment to production is controlled by benmusch/mittab-deploy. The production environment is built using the dockerfiles in this repo, and the tournaments automatically pull the code that is currently on the master branch.

Older versions of the production setup are documented here.

mit-tab's People

Contributors

benmusch avatar jolynch avatar roddajohn avatar benjamin-marks avatar tienne-b avatar juliaann avatar dependabot[bot] avatar ifly6 avatar wangandrewt avatar angelinahli avatar jeddy92 avatar pmckee11 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.