Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Deploy Catalyst application.

by code-ninja (Scribe)
on Nov 02, 2013 at 06:15 UTC ( [id://1060891]=perlquestion: print w/replies, xml ) Need Help??

code-ninja has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I made this small Catalyst app to send JSON data to some client. It is a very simple app and just has one controller (its just a test app, don't bite me for using just one controller!). I'm trying to deploy it on an Apache2 server with fastCGI. I referred this, this and this docs.

In my apache2.conf file, I appended the following:

<VirtualHost *:80> ServerName www.testjson.com DocumentRoot /home/code-ninja/Projects/Perl/testJSON <Directory /home/code-ninja/Projects/Perl/testJSON> Options +ExecCGI </Directory> <Files testjson_fastcgi.pl> SetHandler fastcgi-script </Files> </VirtualHost>

But I'm unable to deploy the app as I dreamed I would.

Also, I read that I can use the in-built server as a full-fledged server using Catalyst::Engine::HTTP::Prefork but I can't make it work. :-(

When I say CATALYST_ENGINE="HTTP::Prefork" myapp_server.pl it complains about missing HTTP::Prefork package. I tried installing it from CPAN but for some reason, it fails during the tests.

I'd be really grateful if some Monk would point me to a good guide elucidating the deployment process. I have configured Apache2 during my RHCE course I took a few years back so I know the jargons quite well. *noviceShowOffSmile*

Replies are listed 'Best First'.
Re: Deploy Catalyst application.
by Khen1950fx (Canon) on Nov 02, 2013 at 06:44 UTC

      The wiki is way out of date.

      Three thousand years of beautiful tradition, from Moses to Sandy Koufax, you're god damn right I'm living in the fucking past

      Umm, it shows the same error.
      ~testJSON/script$ CATALYST_ENGINE='HTTP::Prefork' testjson_server.pl Can't locate Catalyst/Engine/HTTP/Prefork.pm in @INC (@INC contains: / +home/code-ninja/Projects/Perl/testJSON/script/../lib /etc/perl /usr/l +ocal/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr +/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/s +ite_perl .) at /usr/local/share/perl/5.14.2/Class/Load.pm line 177. Compilation failed in require at /usr/local/share/perl/5.14.2/Catalyst +/ScriptRunner.pm line 50.
      Reading through the link you provided.

      Meanwhile, the in-built server provides a -h switch which enables us to host the server on a particular address. What I did, for now, is this:

      ~testJSON/script$ testjson_server.pl -h 192.168.xx.yy
      and the server is hosted on the given address, well that's cool... but only for testing purposes.

Re: Deploy Catalyst application.
by keszler (Priest) on Nov 02, 2013 at 16:32 UTC
    This is a couple of years old, so it might need to be updated for a current Catalyst.
Re: Deploy Catalyst application.
by stonecolddevin (Parson) on Nov 04, 2013 at 18:40 UTC

    I highly recommend using nginx + starman + plack. Deployment is much, much easier and support is far better. If you have questions, you can jump on #catalyst on irc.perl.org.

    Three thousand years of beautiful tradition, from Moses to Sandy Koufax, you're god damn right I'm living in the fucking past

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1060891]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-04-24 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found