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
.
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
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
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.
Now start the server!
python manage.py runserver
You can log in to the admin panel at http://localhost:8000/admin/:
Email: [email protected]
Password: volunteer