(If you want to use this code in a production environment, see below)
It's super-easy to set up our development environment.
To begin development, we recommend that you use vagrant. That makes setting up the development environment super-easy, and also doesn't make any changes to your system.
- VirtualBox from www.virtualbox.org, or your OS's repositories.
- Vagrant from www.vagrantup.com. Find the packages on the website.
- Git version control from www.git-scm.com or your OS's repositories.
Get the Files
- Create a folder for this project.
host:~$ mkdir ~/CrisisCommunicator host:~$ cd CrisisCommunicator
- Clone the Code
host:~/CrisisCommunicator$ git clone https://github.com/WiseEarthTechnology/CrisisCommunicator-Challenge.git
- Start Vagrant
host:~/CrisisCommunicator$ vagrant up
- It will download and install the precise64 virtual image, and then boot the system. After booting, it will update the package lists, and then install
- After it's booted, log into the vagrant box by:
host:~/CrisisCommunicator$ vagrant ssh
- Run the Adorno script. It will set up the vagrant box, install requirements, and create a virtual environment. You will need to run it twice - see it's instructions.
vagrant:~$ curl -s https://raw.github.com/swiftarrow/Adorno/master/adorno.sh | bash
You may now begin development. Since you're in a vagrant box, you do all the development on your host machine (including git versioning), and run the code on the vagrant machine. See the readme for Adorno at https://github.com/swiftarrow/Adorno#tango-steps for a quick command reference.
Run the following commands to create the database.
vagrant:~/vagrant/webapp$ python manage.py syncdb
- Run the followinng command so that necessary static files are copied to the STATIC_ROOT configured in
vagrant:~/vagrant/webapp$ python manage.py collectstatic
- If no errors are reported, the development server is ready.
vagrant:~/vagrant/webapp$ python manage.py runserver 0.0.0.0:8888
The development server will be now accessible from http://127.0.0.1:8888
For a production environment, it is recommended that you follow these steps here: http://grokcode.com/784/how-to-setup-a-linux-nginx-uwsgi-python-django-server/