Derby公式ドキュメントの「Deploy to Heroku」に書かれている通り、 DerbyアプリケーションをHerokuにデプロイするのはかなり簡単にできますので、 試しに前回作成したアプリを実際にデプロイしてみました。
前提としては次の3つが既に済んでいることが条件になります。
- herokuアカウントは登録済み
- heroku-toolbelt.pkgは導入済み
- クレジットカード登録済み
実際に無課金のサービスレベルを指定する場合でもクレジットカード登録は必要なので注意。
あとは、公式ドキュメントの通りに実行していくだけです。 そのときのログ出力も含めたものが次です。
> heroku create
Enter your Heroku credentials.
Email: foobar@example.com
Password (typing will be hidden):
Found existing public key: /Users/safx/.ssh/rsa.pub
Uploading SSH public key /Users/safx/.ssh/rsa.pub... done
Creating derby-sample... done, stack is cedar
http://derby-sample.herokuapp.com/ | git@heroku.com:derby-sample.git
Git remote heroku added
> heroku addons:add rediscloud:20
Adding rediscloud:20 on derby-sample... done, v6 (free)
Use `heroku addons:docs rediscloud:20` to view documentation.
> heroku addons:add mongohq:sandbox
Adding mongohq:sandbox on derby-sample... done, v7 (free)
Use `heroku addons:docs mongohq:sandbox` to view documentation.
> heroku config:set NODE_ENV=production
Setting config vars and restarting derby-sample... done, v9
NODE_ENV: production
> git push heroku master
:
Delta compression using up to 8 threads.
Compressing objects: 100% (3252/3252), done.
Writing objects: 100% (3675/3675), 7.76 MiB | 311 KiB/s, done.
Total 3675 (delta 352), reused 0 (delta 0)
-----> Node.js app detected
-----> Resolving engine versions
Using Node.js version: 0.10.12
Using npm version: 1.2.30
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
:
Dependencies installed
-----> Building runtime environment
-----> Discovering process types
Procfile declares types -> web
-----> Compiled slug size: 13.2MB
-----> Launching... done, v11
http://derby-sample.herokuapp.com deployed to Heroku
To git@heroku.com:derby-sample.git
* [new branch] master -> master
あとは、heroku openでブラウザが起動します。
> heroku open http://derby-sample.herokuapp.com/
0 件のコメント:
コメントを投稿
注: コメントを投稿できるのは、このブログのメンバーだけです。