1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Scala + Play: heroku deploy(初期設定)

1
Last updated at Posted at 2016-06-22

概要

ScalaのPlay frameworkアプリケーションをherokuにDeplayした時にはまったので、メモ

問題点

通常通り、アプリケーションを作成しherokuにdeployしたが、code=H10 アプリケーションがCrashしたなどと言われる。

問題点:詳細

logをよく見てみると以下のように書いてあるので、Application Secretを設定していないことが問題らしい。Play frameworkの公式サイトにも同様の解説を発見。(https://www.playframework.com/documentation/ja/2.3.x/ApplicationSecret)

[error] p.a.l.c.CryptoConfigParser - The application secret has not been set, and we are in prod mode.

解決アクション

  1. 以下でSecret keyを設定

heroku config:set APPLICATION_SECRET="(シークレットキー)" -a (アプリID)

  1. 以下のようなProcfileをアプリケーションのrootに作成

web: target/universal/stage/bin/(小文字でアプリの名前)
-Dhttp.port=${PORT}
-Dplay.crypto.secret=${APPLICATION_SECRET}

別の問題が発生

今度はdbに接続できない旨のエラー発生

Configuration error: Configuration error[Cannot connect to database [default]]

(編集中)

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?