3
3

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.

Heroku First Step!

3
Last updated at Posted at 2012-06-18

1.Herokuにアプリケーションを作成する

//Herokuにログインする
$heroku auth:login

Enter your Heroku credentials.
Email: example@example.com
Password (typing will be hidden): 

//Herokuに新しいスタックを作成する
//明示的にcedarスタックを作成する
$Heroku create --stack cedar ytakataapps

Creating ytakataapps... done, stack is cedar
http://ytakataapps.herokuapp.com/ | git@heroku.com:ytakataapps.git
 !    Notice: on Wed, 20 June, our default stack will change to Cedar. http://bit.ly/Lh0rM5

heroku create --stack cedarについては以下のページの相澤さんからのコメントを見るとわかりやすい
http://dqn.sakusakutto.jp/2012/04/github-heroku-push.html

リンクが切れると嫌なので以下引用

また -s cedar というオプションはherokuに作られる実行環境の種類を指定するものです。
この場合はCedarスタックという最新の実行環境が適用された実行環境ができます。
ちなみに -s cedar を指定しないと bambooスタックで実行環境がつくられます。
CedarスタックとBambooスタックの最も大きな違いはBambooスタックではRubyアプリケーション
しか実行できないがCedarスタックではRuby以外の言語(Java、Python、Node.js、Scalaなど)が
実行可能なことです。

正式な情報はこちら(追記)
https://devcenter.heroku.com/articles/stack

2.Herokuにデプロイするアプリケーションを作成する

//ここは好きなアプリを作成してね
$play new sample -with scala

$cd sample

$play run

//これでとりあえずplayのアプリができる

3.アプリケーションをgitに登録

//gitのリポジトリを初期化
$git init

//1で作成したリポジトリをherokuという名前で登録
$git remote add heroku git@heroku.com:XXXXXXXXXX.git
//ここで登録したリポジトリherokuを削除するには
$ git remote rm heroku

//herokuのリポジトリのmasterにプッシュ
$git push heroku master


//蛇足ですが…
//herokuのアプリケーション名を変えたいときは
$heroku apps:rename newname --app oldname
//別にコマンドからじゃなくて、herokuのウェブコンソールからでも簡単にできます。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?