Skip to content

Commit

Permalink
Update ProductionHeroku.md
Browse files Browse the repository at this point in the history
Added some text to show tailing of a heroku log; added commentary to clarify that Procfile is not actually required by Heroku.

There is another point on Heroku involving setting the build pack (see http://stackoverflow.com/questions/11510256/deploy-a-play-2-0-2-application-on-heroku):
heroku config:add BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-scala.git --app <app name here>

...but I am not sure this is required in all scenarios.
  • Loading branch information
icey502 committed Oct 13, 2013
1 parent 7a81f1d commit d6b4777
Showing 1 changed file with 12 additions and 2 deletions.
Expand Up @@ -81,6 +81,16 @@ $ heroku logs
...
```

We can also tail the logs in the same manner as we could do at a regular command line. This is useful for debugging:
```bash
$ heroku logs -t --app floating-lightning-8044
2011-08-18T00:13:41+00:00 heroku[web.1]: Starting process with command `target/start`
2011-08-18T00:14:18+00:00 app[web.1]: Starting on port:28328
2011-08-18T00:14:18+00:00 app[web.1]: Started.
2011-08-18T00:14:19+00:00 heroku[web.1]: State changed from starting to up
...
```

Looks good. We can now visit the app by running:

```bash
Expand All @@ -103,7 +113,7 @@ web: target/start -Dhttp.port=${PORT} ${JAVA_OPTS} -DapplyEvolutions.default=tru
```

This instructs Heroku that for the process named `web` it will run Play and override the `applyEvolutions.default`, `db.default.driver`, and `db.default.url` configuration parameters. Note that the `Procfile` command can be maximum 255 characters long. Alternatively, use the `-Dconfig.resource=` or `-Dconfig.file=` mentioned in [[production configuration|ProductionConfiguration]] page.

Note that the creation of a Procfile is not actually required by Heroku, as Heroku will look in your play application's conf directory for an application.conf file in order to determine that it is a play application.

## Further learning resources

Expand All @@ -113,4 +123,4 @@ This instructs Heroku that for the process named `web` it will run Play and over
* [Optimizing Play 2 for Database-Driven Apps](http://www.jamesward.com/2012/06/25/optimizing-play-2-for-database-driven-apps)
* [Play 2 Scala Console on Heroku](http://www.jamesward.com/2012/06/11/play-2-scala-console-on-heroku)
* [Play 2 App with a Scheduled Job on Heroku](https://github.com/jamesward/play2-scheduled-job-demo)
* [Using Amazon S3 for File Uploads with Java and Play 2](https://devcenter.heroku.com/articles/using-amazon-s3-for-file-uploads-with-java-and-play-2)
* [Using Amazon S3 for File Uploads with Java and Play 2](https://devcenter.heroku.com/articles/using-amazon-s3-for-file-uploads-with-java-and-play-2)

0 comments on commit d6b4777

Please sign in to comment.