We are working on a project using Play freamework with Scala programming language. Here we’ll discuss about the deployment of the play application on Heroku. This is a very straightforward process. You just have need to follow some simple steps and your application will be on Heroku in minutes.

1. Heroku needs a file named ‘Procfile‘ for each application to be deployed on it. Procfile is a mechanism for declaring what commands are run when your web or worker dynos are run on the Heroku platform. Find more about Procfile here. Create a file Procfile and put it in the root of your project directory.

2. Add the following line to your Procfile that you had just created:

web: target/start -Dhttp.port=$PORT -DapplyEvolutions.default=true

3.Now Initiate the git session for your project and add files to git as

git init
git add .

4. Commit the changes for the project to git as:

git commit -m init

5. On the command line create a new application using the “cedar” stack:

heroku create -s cedar

Celedon Cedar is Heroku’s most recent runtime stack.

6.The application is ready to be deployed to the cloud. push the project files to heroku as:

git push heroku master

7. Go to your heroku account -> MyApps and you’ll find a new application that you had just created. Launch the URL and have a look to your running application on heroku. You can also rename your application as well.

Heroku Applications

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.