Mozzarella is a web application made to help student computing clubs better collaborate and organize their projects, presentations, and even mailing list messages.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
acmwebsite
docs
migration
.gitignore
CONTRIBUTING.rst
LICENSE
MANIFEST.in
README.rst
app.wsgi
development.ini.sample
icon.svg
setup.cfg
setup.py

README.rst

Mozzarella

A Collaborative Web System for Student Computing Clubs

Mozzarella is a web application made to help student computing clubs better collaborate and organize their projects, presentations, and even mailing list messages. Mozzarella is written in Python 3 using the TurboGears framework.

Setting up a Development Environment

  1. First, clone the repository:

    $ git clone https://github.com/ColoradoSchoolOfMines/mozzarella.git
    $ cd mozzarella
  2. Next, install the application in editable form using pip. Passing the --user flag installs for just your local user (typically in ~/.local). Alternatively, you may wish to use a virtual enviornment.

    $ pip install -e . --user
  3. Install development tools for TurboGears:

    $ pip install --user tg.devtools
  4. Next, setup the development.ini file:

    $ cp development.ini.sample development.ini
    $ vim development.ini
  5. Seed the development database:

    $ gearbox setup-app
  6. Finally, serve the application:

    $ gearbox serve --reload --debug

    Once up, use your web browser to navigate to http://localhost:8080/.

Deploying Mozzarella

Mozzarella is a WSGI application, and can be deployed using any WSGI-capable web server. In our production environment, we use Apache 2.4 with mod_wsgi, but any other WSGI environment should work fine (such as Gunicorn, or uWSGI).

First, clone the repository and install the application:

$ git clone https://github.com/ColoradoSchoolOfMines/mozzarella.git /path/to/site

Next, install the application:

$ pip install .

Next, set up a production.ini file next to app.wsgi. This file should look like development.ini, but you should be sure to disable debug mode and make a new random key for cookies.

Database

Supported databases are PostgreSQL and SQLite. For production purposes, we recommend PostgreSQL. MySQL should work, but we have no intents to maintain compatibility with MySQL in the long term.

Configure the path to your database in production.ini:

sqlalchemy.url = postgresql://user:pass@hostname/db

Depot Storage

Setup a depot storage. You can either use a path on the file system, or MongoDB GridFS. Configure in your production.ini:

# If you opt for file system storage
depot.storage_path = /path/to/depot/storage
# If you opt for MongoDB GridFS
depot.backend = depot.io.gridfs.GridFSStorage
depot.mongouri = mongodb://localhost/db

See the Depot documentation for more information.

Apache

Here is an example config for Apache with mod_wsgi:

<VirtualHost *:443>
    ServerAdmin jrosenth@mines.edu
    ServerName acm.mines.edu

    # Setup the WSGI process group
    WSGIProcessGroup mozzarella
    WSGIDaemonProcess mozzarella user=mozzarella group=mozzarella home=/path/to/site threads=8
    WSGIScriptAlias / /path/to/site/app.wsgi

    <Directory /path/to/site>
            Require all granted
    </Directory>

    # Make sure to alias the static files so that we don't have to go thru
    # a WSGI application to get these
    Alias /css /path/to/public/css
    Alias /img /path/to/public/img
    Alias /fonts /path/to/public/fonts
    Alias /js /path/to/public/js

    # Optional, where to log errors to
    ErrorLog /var/log/apache2/mozzarella-error.log
    CustomLog /var/log/apache2/mozzarella-access.log combined
    LogLevel warn

    # Make sure to setup anything else you are using, such as SSL certs
</VirtualHost>