New version of Oxford Talks
A lot of the content of this README relates to local development methods that may still be possible, but aren't typically done by our team in the present day, so there aren't guarantees that they still work as described.
Assuming that VirtualBox and HomeBrew are installed.
Make sure that you have the latest version of formulas in homebrew:
brew update
Install docker from the docker website.
Start the virtual machine:
eval $(docker-machine env default)
docker-machine start default
This requires the virtual machine to be up (either manually started or when your computer starts).
Type the following command in a terminal:
docker-machine ip
This will give you the IP address of the virtual machine (e.g. 192.168.59.103
), you will need
this information later.
Go at the root of your project directory (probably talks.ox
):
docker-compose up
After a few seconds (minutes if it is building the instance for the first time), you should be able to visit
in your web browser: http://<IP ADDRESS>:8000
and visualise Oxford Talks.
If you have a user account (see below), the correct login page is http://<IP ADDRESS>:8000/admin/login
,
the Login
link won't work.
Any modification done in the python code/CSS/templates should immediately be visible when you refresh the page in the web browser.
Type the following command at the root of your project directory:
docker-compose run web python manage.py migrate --settings=talks.settings_docker
Type the following command at the root of your project directory:
docker-compose run web python manage.py createsuperuser --username=myusername [email protected] --settings=talks.settings_docker
You will interactively be asked for a password.
If you do not want to use the docker setup, make sure that you have the following dependencies available:
- python 2.7
- virtualenv (recommended)
- sqlite (recommended, or alternatively PostgreSQL)
- phantomjs (mandatory to run functional tests)
- Apache Solr (search server)
Install python dependencies:
pip install -r requirements.txt
pip install -r requirements_dev.txt
If you're installing on an ubuntu linux machine, you may experience errors when pip encounters the psycopg2 and ldap packages. To prevent this, ensure you install the dev versions of python and libpq.
sudo apt-get install -y python-dev libldap2-dev libsasl2-dev libssl-dev
Create the database:
python manage.py migrate --settings=talks.settings_dev
Load fixtures (test events):
python manage.py loaddata talks/events/fixtures/dev_data.yaml --settings=talks.settings_dev
Run development web server:
make local
Run all tests:
make test
See solr/README.md
SSH key needs to be on the server for the talks user ([email protected])
fab production deploy:master