Deploying Dancer application in DotCloud

Yesterday I had a lot of work to push my code to dotcloud, using the new client, 0.4.1. This mainly because the structure of DotCloud services changed.

These are some pointers to help if you get into the same problems:

  • Now the dotclout push command doesn't copy your code to a specific service. It is copied to all services, even for mysql servers. Also, the copy is not performed directly to the server. First, it is done to an intermediate upload server, and then sent to all your service servers.
  • If you have your code under git, running dotcloud push will send only the files under version control (master branch). You can specify a branch with -b branchname. Also, there is a --all switch to force all files to be synced. Unfortunately this is not working in 0.4.1. Already filled a support request and hope they fix it as soon as possible. For now, either add all your files to the git repository, or hack the dotcloud code (that was what I did).
  • The old documentation of dotcloud had some examples on how to deploy a Dancer application. Yesterday I couldn't find it. Make a symlink from bin/ to app.psgi.
  • You need to add all your dependencies in Makefile.PL. Start by Plack::Request. This is the most difficult missing dependency to find. The others can be easily found reading the Dancer log files.

Not sure if I needed something more, but if I remember it, I'll re-edit this post.

Leave a comment

About Alberto Simões

user-pic I blog about Perl. D'uh!