Skip to content

Latest commit

 

History

History
54 lines (31 loc) · 1.46 KB

File metadata and controls

54 lines (31 loc) · 1.46 KB

Satoyama-API Installation on MAC OSX Mavericks

Python environment installation

  1. cd ~/
  2. sudo easy_install virtualenv
  3. sudo virtualenv env
  4. source env/bin/activate

Repository setup

  1. git clone git@github.com/DgFutureLab/satoyama-api.git
  2. cd satoyama-api/
  3. pip install -r requirements.txt

Setup database

  1. brew install postgresql
  2. postgres -D /usr/local/var/postgres
  3. Make postgresql run everytime:

mkdir -p ~/Library/LaunchAgents

ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents

launchctl load ~/Library/LaunchAgents homebrew.mxcl.postgresql.plist

  1. psql postgres (To get inside the postgres database console)

  2. create role satoyama with login superuser;

  3. alter role satoyama with password 'satoyama';

(Optional: create database your-macosx-username , this step will allow you to login to postgres just using “psql” instead of “psql postgres”)

  1. create database satoyama_prod;

  2. create database satoyama_dev;

  3. create database satoyama_test;

  4. \q

(Optional: \l to list the the databases)

  1. cp db_config_sample.yml db_config.yml

  2. Replace the values of “username” and “password” with the ones you have setup on the previous steps. If you have used the default values when creating the psql database and roles you can leave you can skip this step.

  3. python migrate_dev.py db upgrade (creates database schema)

  4. python run_webserver.py --env development

  5. load http://127.0.0.1:8080 on your browser