Posts

Showing posts from July, 2011

Perl Module Versions in dotcloud

I just realized that I was running an older version in my dotcloud service. There was an update due to a security issue so it was kind of important.

I found that I needed to update (or put) a version number in the Makefile.PL. Here is an example of mine.

Before:
use strict; use warnings; use ExtUtils::MakeMaker; WriteMakefile( NAME => 'leecarmichael', AUTHOR => q{Lee Carmichael }, VERSION_FROM => 'lib/leecarmichael.pm', ABSTRACT => 'Home Site', ($ExtUtils::MakeMaker::VERSION >= 6.3002 ? ('LICENSE'=> 'perl') : ()), PL_FILES => {}, PREREQ_PM => { 'Test::More' => 0, 'YAML' => 0, 'XML::RSS' => 0, 'URI' => 0, 'Date::Parse' => 0, 'Digest::MD5' => 0, 'Plack' => 0, 'Plac…

Making sure dotcloud serves static files not Dancer

Dancer is a great framework. It does a great job making a default development work out of the box. Its a nice alternative to some of the heavier ones that require quite a bit of setup (actually most Perl web frameworks do a great job of this).

Also it makes sure to serve static content (to avoid deployment issues, I assume). But compared to nginx or apache it is much slower at serving this (not a big surprise). In my dotcloud deployments I've found this to be a bit confusing to make sure nginx handles it instead of Dancer.

My first pass at this was setting up these symlinks in my source tree:
static/css --> ../public/css static/javascripts --> ../public/javascripts and such.

It felt wrong to have this inside source control so I dug around a bit and ran into the postinstall script that is supported by the deploydotcloud command option.

I added the following link commands to mine to create those nice symlinks:
#!/bin/sh # used for dotcloud deployment # setup static s…