Koha lacks a proper Plack file for dev install.
debian/templates/plack.psgi is for package install and misc/plack/koha.psgi seems a bit outdated (you need 2 plack servers running — 1 for opac and 1 for intranet — and the REST API is not enabled in it)
I'll attach a new one, based on debian/templates/plack.psgi but suited for a dev install
Created attachment 61812 [details] [review]
Bug 18377: Add PSGI file for dev install
It is very similar to the one for debian install, but uses FindBin to set the
1. Install koha in dev mode
2. Run `starman /your/koha/install/app.psgi`
3. Configure your webserver as a reverse proxy for starman (there is some examples for apache in debian/templates/apache-shared-*-plack.conf)
4. Verify that you can access OPAC, intranet and the REST API
Why do not you update misc/plack/koha.psgi?
(In reply to Jonathan Druart from comment #3)
> Why do not you update misc/plack/koha.psgi?
I would have deleted it but I figured it may be used somewhere. Maybe we could add a deprecation warning in it before deleting it.
As to why I think /app.psgi is a better place, it's because you can just cd to koha directory and run starman without any arguments (you don't have to look after the psgi file), and it will work.
But I'm not strongly against updating misc/plack/koha.psgi if you still think it's better. I can make a new patch
s/look after/look for/
Jonathan, could you take another look here?
It does not sound like a good idea to add a third .psgi file to maintain/update.
Tomas, what is your feeling about this change/need?
(In reply to Jonathan Druart from comment #7)
> It does not sound like a good idea to add a third .psgi file to
My first intention was to move debian/templates/plack.psgi into app.psgi and remove misc/plack/ but I felt that it would have prevented a quick integration into master...
I believe that we should have one (and only one) psgi file, it should not be hidden in debian/ directory, and it should work out-of-the box on dev installs.
Changing status to In Discussion
(In reply to Julian Maurice from comment #0)
> Koha lacks a proper Plack file for dev install.
> debian/templates/plack.psgi is for package install and misc/plack/koha.psgi
> seems a bit outdated
i think BZ16733 now provides DEV_INSTALL support in the debian/templates/plack.psgi file
so, this issue is now resolved?
*** This bug has been marked as a duplicate of bug 16733 ***
(In reply to Mason James from comment #9)
> (In reply to Julian Maurice from comment #0)
> > Koha lacks a proper Plack file for dev install.
> > debian/templates/plack.psgi is for package install and misc/plack/koha.psgi
> > seems a bit outdated
> hi Julian
> i think BZ16733 now provides DEV_INSTALL support in the
> debian/templates/plack.psgi file
> so, this issue is now resolved?
Sort of. I still believe that the main entry point for Koha should be outside of the debian/ directory, and that the "debian case" should be treated as a specific case, rather than the default.
But this "problem" would be solved if we decide to use a web framework like suggested in bug 20582, so this bug is obsolete anyway.