Bug 7844: Plack intranet tooling for developers
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 11 Apr 2012 12:36:24 +0000 (14:36 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 21 Apr 2014 03:17:53 +0000 (03:17 +0000)
commit224eab822d691aeb8f95e39143a830cbafc81eb4
tree763b92c743afa9804eb518d9222db7c6305c5c6f
parentd0e595800f587d29df0f5bca5be707b795b9001e
Bug 7844: Plack intranet tooling for developers

koha.psgi example and plackup.sh script to run any Koha site
intranet or opac interface under Plack with optional multi-process
Starman server

  plackup.sh site-name [intranet]

site-name is used to find config /etc/koha/sites/site-name/koha-conf.xml

All configuration is specified in koha.psgi, which you are welcome to edit
and tune according to your development needs (enable memcache, enable/disable
debugging modules for plack and so on).

For deployment of opac or intranet you would probably want to take a look
in plackup.sh and enable starman as web server (which is pre-forking server
written in perl) and put some web server in front of it to serve static web
files (e.g. ngnix, apache)

When you are happy with it, rename koha.psgi and plackup.sh it to site name
and save it for safe-keeping.

This commit message is included in patch as README.plack because it includes
useful information for people using plack for first time.

Test scenario:
1. install plack and dependencies, as documented at
   http://wiki.koha-community.org/wiki/Plack

2. start ./plackup.sh sitename i[ntranet]

3. open intranet page http://localhost:5001/ and verify that it redirects
   to http://localhost:5001/cgi-bin/koha/mainpage.pl

4. start ./plackup.sh sitename

5. open OPAC http://localhost:5000/ and verify that it redirects to
   http://localhost:5000/cgi-bin/koha/opac-main.pl

6. next step is to take a look into koha.psgi and enable additional
   debug modules, save file and reload page (plackup will reload
   code automatically)

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as advertised. As I have explained in a comment on the bug
this looks like a very good starting point, and we can argue about
the details and add more options over time. Very happy to sign
this off! (My earlier concern about / not working has now been
taken care of, thanks Dobrica!)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
misc/plack/README.plack [new file with mode: 0644]
misc/plack/koha.psgi [new file with mode: 0644]
misc/plack/plackup.sh [new file with mode: 0755]