Skip to content

Latest commit

 

History

History
104 lines (69 loc) · 2.17 KB

SETUP-MAC.md

File metadata and controls

104 lines (69 loc) · 2.17 KB

Setup Instructions for Mac OS X

First, make sure you have Homebrew installed:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

You should also install pip if you haven't already:

sudo easy_install pip

We recommend working inside a virtualenv, but it's not required.

# Install virtualenv if you don't have it
pip install virtualenv

# Create a new virtual environment
virtualenv ubyssey-dev
cd ubyssey-dev

# Activate the virtualenv
source bin/activate

Clone the ubyssey-dispatch-theme repository:

git clone https://github.com/ubyssey/ubyssey-dispatch-theme
cd ubyssey-dispatch-theme

Install the required Python packages with pip:

pip install -r requirements.txt

Note: you might get an error saying that libjpeg is required. You can install it with Homebrew:

brew install libjpeg zlib

Download the sample project settings file and save it to ubyssey-dispatch-theme/ubyssey/settings.py.

Database

Dispatch requires a MySQL database to store information. Install mysql with Homebrew.

brew install mysql

Now run the server and create a fresh database:

mysql.server start
echo "CREATE DATABASE ubyssey" | mysql -u root

Next, populate the database with sample data:

curl https://ubyssey.s3.amazonaws.com/dropbox/ubyssey.sql | mysql -u root ubyssey

Static files

Install the required Node packages with npm:

cd ubyssey/static
npm install

Install a global verison of gulp (if you don't have it already) and build the static files:

npm install -g gulp
gulp

Media Files

Download and unzip the sample media folder to ubyssey-dispatch-theme/media/. This will make it so the images attached to the sample articles are viewable.

Running the server

Now start the server!

python manage.py runserver

Admin Panel

You can log in to the admin panel at http://localhost:8000/admin/:

Email: [email protected]

Password: volunteer