X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=docs%2FINSTALL;h=cb0eccfc85a64dabe7cf82a1479156f72328d4aa;hb=daa3ae42eee5e569881070bcc2958b361743f70a;hp=16ab2b5983a3cc3ebc28d3c1f85728199ee0174c;hpb=93aa30e45f7502f3209bf5ebf4e7966ff5a26899;p=patchwork diff --git a/docs/INSTALL b/docs/INSTALL index 16ab2b5..cb0eccf 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -108,15 +108,22 @@ in brackets): cd ../python ln -s ../packages/django/django ./django - The settings.py file contains default settings for patchwork, you'll - need to configure settings for your own setup. + The patchwork/settings/*.py files contain default settings for patchwork, + you'll need to configure settings for your own setup. - Rather than edit settings.py, create a file 'local_settings.py', and - override or add settings as necessary. You'll need to define the + Rather than editing these files (which will cause conflicts when you + update the base patchwork code), create a file 'production.py', based on + the example: + + cp patchwork/settings/production.example.py \ + patchwork/settings/production.py + + and override or add settings as necessary. You'll need to define the following: SECRET_KEY ADMINS + DATABASES TIME_ZONE LANGUAGE_CODE DEFAULT_FROM_EMAIL @@ -135,10 +142,13 @@ in brackets): Then, get patchwork to create its tables in your configured database: - cd apps/ - PYTHONPATH=../lib/python ./manage.py syncdb + PYTHONPATH=lib/python ./manage.py syncdb + + and initialise the static content: + + PYTHONPATH=lib/python ./manage.py collectstatic - And add privileges for your mail and web users. This is only needed if + and add privileges for your mail and web users. This is only needed if you use the ident-based approach. If you use password-based database authentication, you can skip this step. @@ -190,7 +200,7 @@ in brackets): Once you have apache set up, you can start the fastcgi server with: - cd /srv/patchwork/apps + cd /srv/patchwork/ ./manage.py runfcgi method=prefork \ socket=/srv/patchwork/var/fcgi.sock \ pidfile=/srv/patchwork/var/fcgi.pid @@ -222,14 +232,14 @@ in brackets): directory. (Note, do not use the parsemail.py script directly). Something like this in /etc/aliases is suitable for postfix: - patchwork: "|/srv/patchwork/apps/patchwork/bin/parsemail.sh" + patchwork: "|/srv/patchwork/patchwork/bin/parsemail.sh" You may need to customise the parsemail.sh script if you haven't installed patchwork in /srv/patchwork. Test that you can deliver a patch to this script: - sudo -u nobody /srv/patchwork/apps/patchwork/bin/parsemail.sh < mail + sudo -u nobody /srv/patchwork/patchwork/bin/parsemail.sh < mail 7. Set up the patchwork cron script @@ -240,9 +250,9 @@ in brackets): Something like this in your crontab should work: # m h dom mon dow command - PYTHONPATH=apps:. - DJANGO_SETTINGS_MODULE=settings - */10 * * * * cd patchwork; python apps/patchwork/bin/patchwork-cron.py + PYTHONPATH=. + DJANGO_SETTINGS_MODULE=patchwork.settings.production + */10 * * * * cd patchwork; python patchwork/bin/patchwork-cron.py - the frequency should be the same as the NOTIFICATION_DELAY_MINUTES