[Dancer-users] deployment confusion

Duncan Hutty dhutty at allgoodbits.org
Wed Apr 14 14:03:16 UTC 2010

I'm looking to have nginx use Dancer to run a subsection of a website,
but while I know how to use apache fairly well, I'm new to both nginx
and Dancer.

I've looked carefully at D::Deployment and nginx/PSGI/Plack docs and I
confess to be a little confused as to where each part fits into the whole.

I think I understand how to make nginx proxy for requests for the
subsection using fastcgi:

server {
	listen *:80;
	servername blah
	location	/ {
		root	/var/www/html;
		index	index.html

	location /dancer {
		include fastcgi_params;
		fastcgi_pass	unix:/var/run/dancer.sock;

But that means that, unlike Apache, I need something else to create the
socket, listen for requests, respond to the requests, etc.

I think that could be a standalone plackup daemon:
plackup -s FCGI --listen /var/run/dancer.sock --daemonize --nproc 5
--app /path/to/Dancer_App/app.psgi

that would I then write my own initscript for.

Is that:
a) correct?
b) considered to be an admirable, efficient way to run a small
production server or is this more for a development environment?

I think that instead of the plackup command, I could use Starman to do 
the same thing.

I think my confusion is coming from the fact that there are so many
possible ways to deploy and I don't have a good understanding of how
fastcgi/psgi/plack all fit together.

Perhaps I need some explication rather than merely instructions, 
although instructions would be a good start:)

Duncan Hutty

More information about the Dancer-users mailing list