freebsd-ports/www/py-graphite-web/pkg-message
Chris Rees bfacd85933 - Clean up the defaults to match our installation layout
- Add a pkg-message to explain more about how to set things up

PR:		ports/172960
Submitted by:	brd
Approved by:	maintainer timeout (bsdports@wayfair.com, >2w)

While here, use sed instead of perl to avoid breakage on systems
without perl (...)

Feature safe:	yes
2012-11-06 20:50:05 +00:00

58 lines
2 KiB
Text

==============================================================================
In /usr/local/etc/graphite/ copy the graphite.wsgi.example to graphite.wsgi
To run graphite, you will need to setup Apache by creating a vhost similar to
the following:
WSGIImportScript /usr/local/etc/graphite/graphite.wsgi process-group=graphite application-group=%{GLOBAL}
<VirtualHost *:80>
ServerName graphite
DocumentRoot "/usr/local/graphite/webapp"
# I've found that an equal number of processes & threads tends
# to show the best performance for Graphite (ymmv).
WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
WSGIProcessGroup graphite
WSGIApplicationGroup %{GLOBAL}
# XXX You will need to create this file! There is a graphite.wsgi.example
# file in this directory that you can safely use, just copy it to graphite.wgsi
WSGIScriptAlias / /usr/local/etc/graphite/graphite.wsgi
Alias /content/ /usr/local/graphite/webapp/content/
<Location "/content/">
SetHandler None
</Location>
# XXX In order for the django admin site media to work you
# must change @DJANGO_ROOT@ to be the path to your django
# installation, which is probably something like:
# /usr/lib/python2.6/site-packages/django
#Alias /media/ "@DJANGO_ROOT@/contrib/admin/media/"
Alias /media/ ${${PYTHON_SITELIBDIR}}/django
<Location "/media/">
SetHandler None
</Location>
# The graphite.wsgi file has to be accessible by apache. It won't
# be visible to clients because of the DocumentRoot though.
<Directory /usr/local/etc/graphite/>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
Then initialize the sqllite user database and create the admin user:
python ${PYTHON_SITELIBDIR}/graphite/manage.py syncdb
Change the ownership of the user database so the webapp can write to it:
chown ${WWWOWN} ${PREFIX}/graphite/storage/graphite.db
Now you should be able to access the graphite virtual host you created in the
first step.
==============================================================================