Skip to content

Latest commit

 

History

History
87 lines (59 loc) · 2.42 KB

setup.md

File metadata and controls

87 lines (59 loc) · 2.42 KB

Operating system

FreedomSponsors uses a few python libs that I could never get to work properly on Windows or Mac. That means you need linux to get FS running on your machine.

You can get Ubuntu VMs for VirtualBox here.

Alternatively, you can run FS in sandbox mode (no database, good enough to work with html/css/js only)

Watch the videos

If you have trouble following the instructions here, we have videos to help :-)

https://www.youtube.com/watch?v=Z0e_GNaPA-8&list=PLgMNBa0XaIgd4hpofUDaeyRNKMUlSfZde

Running

Instructions to run application locally:

  1. Install Postgresql and some other needed libs
$ sudo apt-get update --fix-missing
$ sudo apt-get install postgresql postgresql-server-dev-all \
python-dev python-lxml libxslt-dev libpq-dev pgadmin3 \
libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev \
liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
# see http://stackoverflow.com/questions/34631806/fail-during-installation-of-pillow-python-module-in-linux
  1. Clone the repo.
$ git clone git://github.com/freedomsponsors/www.freedomsponsors.org.git
$ cd www.freedomsponsors.org
  1. Create the database/default user.
$ sudo su postgres #run the next command as postgres
$ createuser -d -SRP frespo # this will prompt you to create a password (just use frespo for now)
$ createdb -O frespo frespo
$ exit # go back to your normal user
  1. Create a virtualenv and install dependencies.
$ python bootstrap

This will create a python virtualenv and install all dependecies listed on requirements.txt on it. If this command fails because of psycopg2, make sure you have installed postgresql-server-dev-all (mentioned on step 1)

Then you can activate the virtualenv:

$ source bin/activate

To deactivate the virtualenv

$ deactivate

Remember: You'll need to be in the virtual environment to use ./manage.py ... commands

  1. Create database objects.
$ cd djangoproject
$ ./manage.py syncdb --migrate --noinput
  1. Run!
$ ./manage.py runserver # and visit http://localhost:8000

Next: