jan
jan

Reputation: 453

How to deploy Play application using activator to Heroku?

I am trying to deploy an activator app to Heroku. Without an Proc-file Heroku tells me that no cedar app is detected. When i add a Proc file and add

web: ./activator start -Dhttp.port=${PORT}

the startup fails.

How to get it running on Heroku?

UPDATE The problem was a (not yet needed) package.json. Heroku obviously infered by that file that it is a node.js app. After renaming the app startet without a Proc file. But now i got unresolved dependencies for

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.play#play_2.11;2.3.2: not found
[warn]  :: com.typesafe.play#play-jdbc_2.11;2.3.2: not found
[warn]  :: com.atlassian.jwt#jwt-core;1.2.3: not found
[warn]  :: com.atlassian.jwt#jwt-api;1.2.3: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::

and solved that by adding

resolvers += "typesafe" at "http://repo.typesafe.com/typesafe/releases/"

Then I had the problem that we use SASS and it is not supported by Heroku. So I tried to deploy via the sbt plugin. That led to the following problem:

[error] (fashion-advice-common/compile:deployHeroku) You must stage your application before deploying it!
[error] (fashion-advice-customer/compile:deployHeroku) Could not find app ''. Check that herokuAppName setting is correct.
[error] (fashion-advice-stylist/compile:deployHeroku) Could not find app ''. Check that herokuAppName setting is correct.

Perhaps because we use 3 sub modules?

Upvotes: 2

Views: 665

Answers (1)

Michael Zajac
Michael Zajac

Reputation: 55569

Your Procfile should look more like this:

web: target/universal/stage/bin/name_of_app_repo -Dhttp.port=${PORT}

Source

Upvotes: 1

Related Questions