July 2014 Archives

How to create an installable web application with config/data/bin stuff?

I'm writing a Dancer2 web application which contains configuration (config.yml, development.yml, production.yml, and-so-on.xml), application data (js, css, templates) and application binary (Perl bootstrapper, Perl tools) parts.

Usualy a web distribution is installed via extracting a ZIP file and there you have your e.g. /public, /environments, /lib and /bin. You start your web application with perl ./bin/app.pl or similar.

What I currently think about is to actual install a Dancer2 web application like normal (linux/unix) applications would do. So /public would end up at /usr/share/mydist/public, /views would be /usr/share/mydist/views, /environments including /config.yml are located at /etc/mydist/environments and /etc/mydist/config.yml. /logs moved to /var/log/mydist and /lib is system wide installed like you install a normal dist with cpan. Scripts in /bin would "installed" to /usr/bin

Assuming I use Dist::Zilla to create dists how could I achieve this?

I remember there was a previous discussion about installing web application with CPAN but I can't find it anymore. Neither - IIRC - was the discussion concluded.

About burnersk

user-pic I blog about Perl.