Russian link is here.
Recently I found some amazing trick - you can use your favourite web-platform on Heroku! It can be possible using special feature called buildpacks. Of course, Perl is supported too - Miyagawa yourself wrote buildpack for PSGI/Starman application deployment - https://github.com/miyagawa/heroku-buildpack-perl :)
So, I've decided to move my Plusfeed.pl application to Heroku - because Stackato's trial period is over now. Also some annoying bug was also fixed - I've change ID of message to URL instead of Etag and now message will not go up in RSS feed after adding comment or +1. :(
Instruction below -
1. Please create Makefile.PL for your application (see ExtUtils::MakeMaker for its format)
use strict;
use warnings;
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'plusfeed.pl',
VERSION => '0.05',
AUTHOR => 'Denis Zhdanov ',
EXE_FILES => ['app.psgi'],
PREREQ_PM => {
'Google::Plus' => '0.004',
'XML::RSS' => '1.49',
'XML::Atom::SimpleFeed' => '0.86',
'Plack::App::Path::Router' => '0',
'Plack::App::File' => '0',
'Plack::Builder' => '0',
'Path::Router' => '0.11',
'CHI' => '0.5',
'Starman' => '0.3',
},
test => {TESTS => 't/*.t'}
);
2. Add your app to Heroku using custom buildpack -
git init
git add .
git commit -m "Initial version"
heroku create --stack cedar --buildpack \ http://github.com/miyagawa/heroku-buildpack-perl.git
git push heroku master
git add .
git commit -m "Initial version"
heroku create
git push heroku master
All magic is in this buildpack line (of course, change to the name of your application).
You will get something like
-----> Heroku receiving push
-----> Fetching custom buildpack... done
-----> Perl/PSGI app detected
-----> Installing dependencies
-----> Installing Starman
Starman is up to date. (0.3000)
-----> Discovering process types
Procfile declares types -> (none)
Default types for Perl/PSGI -> web
-----> Compiled slug size is 6.8MB
-----> Launching... done, v7
http://plusfeed-pl.herokuapp.com deployed to Heroku
(In the first time you will get much more lines with installation of cpanm and all dependencies, but not for update).
Thats all, folks! Your app is up and running.
My app lives on http://plusfeed-pl.herokuapp.com now.
1 комментарий:
на dotcloud.com аналогичная система, и тоже вроде небольшие приложения можно бесплатно размещать.
Отправить комментарий