MIGRATED TO GITLAB: https://gitlab.com/ColoradoSchoolOfMines/mozzarella
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.
First, clone the repository:
$ git clone https://github.com/ColoradoSchoolOfMines/mozzarella.git $ cd mozzarella
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
Install development tools for TurboGears:
$ pip3 install --user tg.devtools
Next, setup the
development.ini
file:$ cp development.ini.sample development.ini $ vim development.ini
Seed the development database:
$ gearbox setup-app
Finally, serve the application:
$ gearbox serve --reload --debug
Once up, use your web browser to navigate to http://localhost:8080/.
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.
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
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.
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>