run in production on shared hosting
Hello, what is the best way to run (a lot of) Dancer apps in production on shared hosting now? I'm the owner and main developer at small hosting company and want to create the environment that allows a lot of users to quick run a lot of Dancer apps. I read Dancer::Deployment but didn't decide anything - Ubic and daemontools don't looks good way (and Ubic at least requires access to /etc), CGI is slow. As for now I do manually something like plackup -E production -s Starman --workers=4 -l /home/$user/tmp/$app.sock -a bin/app.pl & (and I use nginx before app) but it is not easy to start/stop and monitor such apps. -- Best Regards, Nick Knutov http://knutov.com
Hi Nick, why not using nginx and plackup as you describe and use the -R option provided by plackup to watch for example a restart.txt file dedicated for each application. Here is the script I use to start / stop plack for a single app. I think managing more apps with this script should not be a problem nicolas 2011/11/11 Nick Knutov <mail@knutov.com>
Hello,
what is the best way to run (a lot of) Dancer apps in production on shared hosting now?
I'm the owner and main developer at small hosting company and want to create the environment that allows a lot of users to quick run a lot of Dancer apps.
I read Dancer::Deployment but didn't decide anything - Ubic and daemontools don't looks good way (and Ubic at least requires access to /etc), CGI is slow. As for now I do manually something like
plackup -E production -s Starman --workers=4 -l /home/$user/tmp/$app.sock -a bin/app.pl &
(and I use nginx before app) but it is not easy to start/stop and monitor such apps.
-- Best Regards, Nick Knutov http://knutov.com ______________________________**_________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/**cgi-bin/listinfo/dancer-users<http://www.backup-manager.org/cgi-bin/listinfo/dancer-users>
On 12/11/11 7:48 AM, Nick Knutov wrote:
Hello,
what is the best way to run (a lot of) Dancer apps in production on shared hosting now?
I'm the owner and main developer at small hosting company and want to create the environment that allows a lot of users to quick run a lot of Dancer apps.
I read Dancer::Deployment but didn't decide anything - Ubic and daemontools don't looks good way (and Ubic at least requires access to /etc), CGI is slow. As for now I do manually something like
plackup -E production -s Starman --workers=4 -l /home/$user/tmp/$app.sock -a bin/app.pl &
(and I use nginx before app) but it is not easy to start/stop and monitor such apps.
Hi Nick, I am just throwing around ideas as your situation sounds unique. I am also going to assume you are running some sort of Linux. Could you create a /home/$user/init.d/ directory and have init scripts that starts each app the user has in it. ? You could then create a global init script in /etc/init.d , say hosted_dancer_apps which loops through each $user directory and runs each script in the corresponding init directory. Or you could also just use some kind of configuration file for each dancer app for each user and get the global init script to read the configs and start the apps. A few weeks ago I knocked up a (very) basic centos startup script which could be modified for your case if you run some kind of RH derivative. The script can be found at http://gru.gs/4 I hope my suggestions are helpful. Matt -- quispiam.com | filtosaur.com 0405 001 707 | Eradicate unwanted email
On Nov 11, 2011, at 2:48 PM, Nick Knutov wrote:
Hello,
what is the best way to run (a lot of) Dancer apps in production on shared hosting now?
I'm the owner and main developer at small hosting company and want to create the environment that allows a lot of users to quick run a lot of Dancer apps.
I read Dancer::Deployment but didn't decide anything - Ubic and daemontools don't looks good way (and Ubic at least requires access to /etc), CGI is slow. As for now I do manually something like
plackup -E production -s Starman --workers=4 -l /home/$user/tmp/$app.sock -a bin/app.pl &
(and I use nginx before app) but it is not easy to start/stop and monitor such apps.
You might find the following of interest https://github.com/punkish/web_ctl -- Puneet Kishor
Thanks, great script, I saw it by forgot about it ;) 12.11.2011 3:22, Puneet Kishor пишет:
On Nov 11, 2011, at 2:48 PM, Nick Knutov wrote:
Hello,
what is the best way to run (a lot of) Dancer apps in production on shared hosting now?
I'm the owner and main developer at small hosting company and want to create the environment that allows a lot of users to quick run a lot of Dancer apps.
I read Dancer::Deployment but didn't decide anything - Ubic and daemontools don't looks good way (and Ubic at least requires access to /etc), CGI is slow. As for now I do manually something like
plackup -E production -s Starman --workers=4 -l /home/$user/tmp/$app.sock -a bin/app.pl&
(and I use nginx before app) but it is not easy to start/stop and monitor such apps.
You might find the following of interest
https://github.com/punkish/web_ctl
-- Puneet Kishor
-- Best Regards, Nick Knutov http://knutov.com ICQ: 272873706 Voice: +7-904-84-23-130
2011/11/11 Nick Knutov <mail@knutov.com>:
what is the best way to run (a lot of) Dancer apps in production on shared hosting now?
Sorry, Nick, i don't have good idea how to implement your plan, but i really welcome such solution. I think that missing such solution is main problem why beginner web-developers don't choose Perl as their first tool. -- Wbr, Kõike hääd, G
I think good solution will be available in next couple days ) 12.11.2011 15:47, WK пишет:
2011/11/11 Nick Knutov<mail@knutov.com>:
what is the best way to run (a lot of) Dancer apps in production on shared hosting now?
Sorry, Nick, i don't have good idea how to implement your plan, but i really welcome such solution. I think that missing such solution is main problem why beginner web-developers don't choose Perl as their first tool.
-- Best Regards, Nick Knutov http://knutov.com ICQ: 272873706 Voice: +7-904-84-23-130
participants (5)
-
Matthew Vickers -
Nick Knutov -
Nicolas -
Puneet Kishor -
WK