Skip to content

Commit

Permalink
Merge branch 'master' of github.com:tobami/codespeed
Browse files Browse the repository at this point in the history
Conflicts:
	MANIFEST.in
	setup.py
  • Loading branch information
tobami committed Jul 4, 2011
2 parents 28c95e5 + 8b3e9f2 commit 9f7f015
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include README.md
include LICENSE
recursive-include codespeed/templates/codespeed/ *
recursive-include codespeed/static/ *
recursive-include codespeed/static/ *
31 changes: 24 additions & 7 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,28 @@ It is assumed you are in the root directory of the Codespeed software.
1. Install the Python pip module
`which pip >/dev/null || easy_install pip`
(You might be required to use sudo)
2. Copy the example directory to your project. (Prevents updates on
2. You *must* copy the example directory to your project. (Prevents updates on
git tracked files in the future.) Let's call it speedcenter
`cp -r example speedcenter`
3. Enter that directory
`cd speedcenter`
4. Install Django, Codespeed and other dependencies using pip
`pip install -r requirements.txt`
(You might be required to use sudo)
5. Initialise the Django Database
5. Add codespeed to your Python path
Either
`export PYTHONPATH=../:$PYTHONPATH`
or
`ln -s ../codespeed .`
6. Initialise the Django Database
`python manage.py syncdb`
(Yes, add a superuser.)
python manage.py migrate
6. Finally, start the Django development server.
`python manage.py migrate`
Optionally, you may want to load the fixture data for a try
`python manage.py loaddata ../codespeed/fixtures/testdata.json`
7. Finally, start the Django development server.
`python manage.py runserver`
7. Enjoy.
8. Enjoy.
`python -m webbrowser -n http://localhost:8000`

## Installing for production
Expand All @@ -47,8 +54,8 @@ not hesitate to consult a search engine to tune your set-up.
### NGINX + GUNICORN: Easy as manage.py runserver
Assumed you have a [Debian](http://www.debian.org) like system.

1. Follow the steps from the development server set-up
2. Install nginx and gunicorn
1. Follow the steps from the development server set-up up to the the 6th step (database init).
2. Install [nginx](http://nginx.net/) and [gunicorn](http://gunicorn.org/)
`sudo apt-get install nginx gunicorn`
3. Tune /etc/nginx/sites-enabled/default to match
deploy/nginx.default-site.conf
Expand All @@ -60,6 +67,13 @@ Assumed you have a [Debian](http://www.debian.org) like system.
5. Prepare static files
`cd /path/to/speedcenter/`
`python ./manage.py collectstatic`
6. Add 'gunicorn' to your INSTALLED_APPS in settings.py
INSTALLED_APPS = (
'django.contrib.auth',
[...]
'south',
'gunicorn'
)
6. Run speedcenter by
`python ./manage.py run_gunicorn`
7. Check your new speedcenter site! Great! But wait, who runs gunicorn after the
Expand All @@ -73,6 +87,9 @@ Assumed you have a [Debian](http://www.debian.org) like system.
5. `supervisorctl update`
6. `supervisorctl status`
speedcenter RUNNING pid 2036, uptime 0:00:05
8. Warning: You may find another way to run gunicorn using `gunicorn_django`. That might
have a shebang of `#!/usr/bin/python` bypassing your virtualenv. Run it out of your
virtualenv by `python $(which gunicorn_django)`

### Good old Apache + mod_wsgi
If you don't like suprises and are not into experimenting go with the old work horse.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
url='https://github.com/tobami/codespeed',
license='GNU Lesser General Public License version 2.1',
install_requires=['django>=1.3', 'isodate', 'south'],
packages=['codespeed'],
packages=find_packages(exclude=['ez_setup', 'example']),
description='A web application to monitor and analyze the performance of your code',
include_package_data=True,
zip_safe=False,
Expand Down

0 comments on commit 9f7f015

Please sign in to comment.