-
Clone this repository
-
(optional) Create a virtualenv; source into the virtualenv.
-
Install requirements by running
pip install -r requirements.txt
-
Set up host specific settings in a custom settings module (for an example of new available settings to override - with their defaults, see below)
-
run the following set of django management commands:
python manage.py syncdb --noinput
python manage.py migrate
python manage.py collectstatic --noinput
-
Run or restart your wsgi server.
-
Enter the site's
admin
panel and configure the correct Site hostname. -
Add the decay_balance management command as a cronjob. For instance to run it every day at 12:00am (this needs to be done only once):
crontab -l > temp_jobs echo "0 0 * * * python manage.py decay_balance" >> temp_jobs crontab < temp_jobs rm temp_jobs
(in the future we will also support: python manage.py compilemessages
)
To run the test suite, simply run:
python manage.py test --settings=bountyfulcoins.test_settings
After a version is complete, the following needs to be done:
-
Tag the version in github and selecting 'Draft new release'. Name the tag using the Semantic versioning format.
For example:
v0.3.0
to release the version 0.3. You may omit the last version (PATCH) if it's zero, e.g: v0.3. -
Connect to the target server machine, and git clone from this tag
git fetch --tags origin master git checkout tags/<new_tag_name> # e.g: git checkout tags/v0.3
-
Run the deployment steps detailed above (usually, only the django commands need to be repeated)
-
Test the target server for regressions and critical issues. If any problems arise, revert to the previously tagged release by running:
git checkout tags/<previous_tag_name>
-
If reverted to a previous version, and new version had a new migration, then south migrations should be reversed back to the previous version by running:
python manage.py migrate bountyfullapp <previous migration>