I just published a Heroku Plugin for Play Framework. Right now it just deploys a Play app to Heroku. Try it out:
- Signup for a Heroku account
- Install the Heroku plugin locally:
$ play install heroku
- Create a Play (1.2.3 or 1.2.4) app:
$ play new foo --with heroku
Or if you already have an existing Play app, add the follow line to the conf/dependencies.yml file and then run “play deps –sync”:
- play -> heroku 0.2
- Deploy the app:
$ play heroku:deploy foo
You should see something like:
~ _ _ ~ _ __ | | __ _ _ _| | ~ | '_ \| |/ _' | || |_| ~ | __/|_|\____|\__ (_) ~ |_| |__/ ~ ~ play! 1.2.4, http://www.playframework.org ~ ~ Deploying app to Heroku Listening for transport dt_socket at address: 8000 Project directory: /home/jamesw/Desktop/foo Read Heroku API key from /home/jamesw/.heroku/credentials Created new ssh key pair (heroku_rsa) in: /home/jamesw/.ssh Added the heroku_rsa.pub ssh public key to your Heroku account Created a .git directory for your project Added and committed all of the local changes to the git repo Created app: cold-night-1511 http://cold-night-1511.herokuapp.com/ Added git remote: firstname.lastname@example.org:cold-night-1511.git Deploying application via git push Application deployed ~ App Deployed
Note: I haven’t figured out how to pipe the git push output to the screen yet, so be patient when the app is being git pushed. It’s working, just takes a minute.
- Check out your Play app running on the cloud! Use the URL in the “heroku:deploy” output. This should work with new and existing Play apps.
All of the code for the Heroku Play module is on GitHub. There is more I want to do with this (scaling, logs, etc) and your contributions are certainly welcome! Keep checking back here for updates and let me know how it goes!