GitHub  

Deploy Mojolicious to Heroku

perl to the cloud in one step

Install

curl -L tempi.re/bundles/mojo-deploy-heroku | sh


Workflow

  1. Sign up with Heroku

    https://api.heroku.com/signup
    
  2. Generate Mojolicious app

    mojo generate lite_app hello
    
  3. Deploy

    hello deploy heroku --create
    


Demonstration


Usage

script/my_app deploy heroku [OPTIONS]


Create new app with randomly selected name and deploy

script/my_app deploy heroku --create


Create new app with randomly selected name and specified api key

script/my_app deploy heroku --create --api-key 123412341234...


Deploy app (new or existing) with specified name

script/my_app deploy heroku --name happy-cloud-1234


These options are available:

-n, --appname <name>      Specify app for deployment
-a, --api-key <api_key>   Heroku API key (read from ~/.heroku/credentials by default).
-c, --create              Create a new Heroku app
-v, --verbose             Verbose output (heroku response, git output)
-h, --help                This message

NOTE The deploy command itself works on Windows, but the Heroku service does not reliably accept deployments from Windows. Your mileage may vary.

The deploy command creates a git repository of the current directory's contents in /tmp, and then pushes it to a remote heroku repository.


More

There's a lot going on under the hood. You can learn about it.

\o/