[Koha-bugs] [Bug 7844] plack scripts for developers

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 12 10:55:07 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7844

--- Comment #24 from Magnus Enger <magnus at enger.priv.no> ---
Created attachment 26148
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26148&action=edit
Bug 7844 - [SIGNED-OFF] 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 welcomed 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 version does not have mapping to / of opac or intranet, so you need to
use full URLs to pages as specified in test scenario. This will be fixed when
we are ready to deploy plack, but for now it's clear indication that this
is intended for developers which know what to do anyway.

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/cgi-bin/koha/mainpage.pl
   and verify that it works

4. start ./plackup.sh sitename

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

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 <digitalutvikling at gmail.com>
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!

It is a minor drawback that the "default pages" do not work:
http://localhost:5000/
http://localhost:5001/
but I think this can be deferred to a followup.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list