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?

herokuのaddonsの共有と解除方法(主にPostgres)

Last updated at Posted at 2024-10-12

概要

productionとstagingでDBを同一にしたい場合などに、productionのアドオンをstagingに共有する方法です。
めっちゃ簡単にStagingが構築できるので便利。

スクリーンショット 2024-10-12 10.59.21.png

共有

アドオン名を確認する

heroku addons -a [productionアプリ名]

postgresを共有したい場合、これで postgresql-flat-xxxxやらredis-contoured-xxxxのようなアドオン名が表示される。

アタッチする

stagingにproductionのPostgresアドオンをアタッチする場合

heroku addons:attach [アドオン名] -a [stagingのアプリ名]

解除

デタッチする

heroku addons:detach [アドオン名] -a [stagingアプリ名]

参照

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?