LoginSignup
0
0

More than 5 years have passed since last update.

(編集中)playframework(2.2) をherokuへデプロイ

Last updated at Posted at 2014-01-18

アカウントを作成

ツールキットの導入(コマンドラインツール)

https://toolbelt.heroku.com/
適切なものをDLして導入してください・

Procfileファイルを用意


web: target/universal/stage/bin/[playproject] -Dhttp.port=$PORT -Dconfig.file=conf/production.conf

※公式ページに書いてあることは2.1までのことなので注意。2.2の場合は↑
http://stackoverflow.com/questions/19085213/scala-play-2-2-application-crashes-after-deploying-in-heroku-target-start-no-su

※本番用と開発用で、設定ファイルを切り替えるため、-Dconfig.fileオプションをつけている。
http://stackoverflow.com/questions/14673722/maintaining-seperate-dev-prod-config-files-on-heroku-doesnt-work
http://swn.mahata.net/article/20130508

MongoHQアドオンの追加

  • herokuに支払い情報(クレジットカード)を登録

(billingのところ)

  • アドオン追加(MongoDB)

https://addons.heroku.com/
にログイン

planを選んで(free)、下のほうのプルダウンでアプリ名を選択、Add MongoHQ Sandbox for Freeのボタンを押下

  • アドオン追加(Redis)

planを選んで(free)、下のほうのプルダウンでアプリ名を選択、Add Nano for Freeのボタンを押下

デプロイ

(すでにgitリポジトリにはなっている前提で)

git push heroku master

状態確認

heroku ps

0
0
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
0
0