0
0

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 1 year has passed since last update.

heroku add-on 追加方法メモ

Posted at

herokuアドオンの追加方法

1.以下のコマンドを実行しherokuにログインする。

ターミナル
heroku login 

この際、以下のコメントが返ってくる。「何かキーを押してブラウザでログインしよう」ということなので、適当にエンターキーでも押してみる。

ターミナル
heroku: Press any key to open up the browser to login or q to exit:

すると、ブラウザが立ち上がり、メールアドレス、パスワードの入力フォームが立ち上がるので、入力する。以下の画面が表示されてログイン完了。

また、dockerで環境を構築している場合は、以下のコマンドも実行し、heroku上のContainer Registoryへのログインも行っておく。

ターミナル
heroku container:login

2.ログインした状態のままターミナルに戻り、以下のコマンドを実行し、対象となるherokuアプリを作成

ターミナル
heroku create アプリ名

3.次のコマンドを実行してアドオンを追加。今回はherokuでmysqlを使用するためのJAWSDBというアドオンを追加している。(JAWSDBなどのアドオンでは利用に際してクレジットカード情報の登録が必要となるので、herokuのアカウント情報から必要に応じて登録のこと。)

heroku addons:create jawsdb:kitefin

また、herokuのページから直接アドオンを追加する場合、作成したアプリのResourcesのAdd-onsの項目で、アドオンを検索して追加することができる。↓
スクリーンショット 2022-06-12 15.22.58.png

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?