Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Mozzarella is a web application made to help student computing clubs better collaborate and organize their projects, presentations, and even mailing list messages.

License

Notifications You must be signed in to change notification settings

ColoradoSchoolOfMines/mozzarella

Repository files navigation

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 pip3. Passing the --user flag installs for just your local user (typically in ~/.local). Alternatively, you may wish to use a virtual enviornment.

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

    $ pip3 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:

$ pip3 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 [email protected]
    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>

About

Mozzarella is a web application made to help student computing clubs better collaborate and organize their projects, presentations, and even mailing list messages.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published