yoshikouki / dividend-portal

1 stars 1 forks source link

heroku の DB に課金したのでメモ #91

Closed yoshikouki closed 3 years ago

yoshikouki commented 3 years ago
~/src/github.com/yoshikouki/dividend-portal revert-render
❯ heroku accounts:set personal
~/src/github.com/yoshikouki/dividend-portal revert-render
❯ heroku pg:info
=== DATABASE_URL
Plan:                  Hobby-dev
Status:                Available
Connections:           0/20
PG Version:            13.4
Created:               2021-06-27 14:34 UTC
Data Size:             9.5 MB/1.00 GB (In compliance)
Tables:                8
Rows:                  2132/10000 (In compliance)
Fork/Follow:           Unsupported
Rollback:              Unsupported
Continuous Protection: Off
Add-on:                postgresql-flexible-02507

~/src/github.com/yoshikouki/dividend-portal revert-render
❯ heroku addons:create heroku-postgresql:hobby-basic
Creating heroku-postgresql:hobby-basic on ⬢ dividend-portal... $9/month
Database has been created and is available
 ! This database is empty. If upgrading, you can transfer
 ! data from another database with pg:copy
Created postgresql-acute-17490 as HEROKU_POSTGRESQL_RED_URL
Use heroku addons:docs heroku-postgresql to view documentation

~/src/github.com/yoshikouki/dividend-portal revert-render
❯ heroku maintenance:on
Enabling maintenance mode for ⬢ dividend-portal... done

~/src/github.com/yoshikouki/dividend-portal revert-render
❯ heroku pg:info
=== DATABASE_URL
Plan:                  Hobby-dev
Status:                Available
Connections:           0/20
PG Version:            13.4
Created:               2021-06-27 14:34 UTC
Data Size:             9.5 MB/1.00 GB (In compliance)
Tables:                8
Rows:                  2132/10000 (In compliance)
Fork/Follow:           Unsupported
Rollback:              Unsupported
Continuous Protection: Off
Add-on:                postgresql-flexible-02507

=== HEROKU_POSTGRESQL_RED_URL
Plan:                  Hobby-basic
Status:                Available
Connections:           0/20
PG Version:            13.4
Created:               2021-09-15 13:16 UTC
Data Size:             7.9 MB/10.00 GB (In compliance)
Tables:                0
Rows:                  0/10000000 (In compliance)
Fork/Follow:           Unsupported
Rollback:              Unsupported
Continuous Protection: Off
Add-on:                postgresql-acute-17490
~/src/github.com/yoshikouki/dividend-portal revert-render 6s
❯ heroku pg:copy DATABASE_URL HEROKU_POSTGRESQL_RED_URL
 ▸    WARNING: Destructive action
 ▸    This command will remove all data from RED
 ▸    Data from DATABASE will then be transferred to RED
 ▸    To proceed, type dividend-portal or re-run this command with --confirm dividend-portal

> dividend-portal
Starting copy of DATABASE to RED... done
Copying... done
~/src/github.com/yoshikouki/dividend-portal revert-render 46s
❯ heroku pg:info
=== DATABASE_URL
Plan:                  Hobby-dev
Status:                Available
Connections:           0/20
PG Version:            13.4
Created:               2021-06-27 14:34 UTC
Data Size:             9.5 MB/1.00 GB (In compliance)
Tables:                8
Rows:                  2132/10000 (In compliance)
Fork/Follow:           Unsupported
Rollback:              Unsupported
Continuous Protection: Off
Add-on:                postgresql-flexible-02507

=== HEROKU_POSTGRESQL_RED_URL
Plan:                  Hobby-basic
Status:                Available
Connections:           0/20
PG Version:            13.4
Created:               2021-09-15 13:16 UTC
Data Size:             9.3 MB/10.00 GB (In compliance)
Tables:                8
Rows:                  2310/10000000 (In compliance)
Fork/Follow:           Unsupported
Rollback:              Unsupported
Continuous Protection: Off
Add-on:                postgresql-acute-17490
~/src/github.com/yoshikouki/dividend-portal revert-render
❯ heroku pg:promoteHEROKU_POSTGRESQL_RED_URL
 ›   Warning: pg:promoteHEROKU_POSTGRESQL_RED_URL is not a heroku command.
Did you mean pg:promote? [y/n]: y
 ›   Error: Missing 1 required arg:
 ›   database
 ›   See more help with --help
~/src/github.com/yoshikouki/dividend-portal revert-render 6s
❯ heroku pg:info
=== DATABASE_URL, HEROKU_POSTGRESQL_RED_URL
Plan:                  Hobby-basic
Status:                Available
Connections:           0/20
PG Version:            13.4
Created:               2021-09-15 13:16 UTC
Data Size:             9.4 MB/10.00 GB (In compliance)
Tables:                8
Rows:                  2310/10000000 (In compliance)
Fork/Follow:           Unsupported
Rollback:              Unsupported
Continuous Protection: Off
Add-on:                postgresql-acute-17490

=== HEROKU_POSTGRESQL_CHARCOAL_URL
Plan:                  Hobby-dev
Status:                Available
Connections:           0/20
PG Version:            13.4
Created:               2021-06-27 14:34 UTC
Data Size:             9.5 MB/1.00 GB (In compliance)
Tables:                8
Rows:                  2132/10000 (In compliance)
Fork/Follow:           Unsupported
Rollback:              Unsupported
Continuous Protection: Off
Add-on:                postgresql-flexible-02507
~/src/github.com/yoshikouki/dividend-portal revert-render
❯ heroku addons:destroy HEROKU_POSTGRESQL_CHARCOAL_URL
 ▸    WARNING: Destructive Action
 ▸    This command will affect the app dividend-portal
 ▸    To proceed, type dividend-portal or re-run this command with --confirm dividend-portal

> dividend-portal
Destroying postgresql-flexible-02507 on ⬢ dividend-portal... done
~/src/github.com/yoshikouki/dividend-portal revert-render 14s
❯ heroku pg:info
=== DATABASE_URL, HEROKU_POSTGRESQL_RED_URL
Plan:                  Hobby-basic
Status:                Available
Connections:           0/20
PG Version:            13.4
Created:               2021-09-15 13:16 UTC
Data Size:             9.5 MB/10.00 GB (In compliance)
Tables:                8
Rows:                  2310/10000000 (In compliance)
Fork/Follow:           Unsupported
Rollback:              Unsupported
Continuous Protection: Off
Add-on:                postgresql-acute-17490
~/src/github.com/yoshikouki/dividend-portal revert-render
❯ heroku maintenance:off
Disabling maintenance mode for ⬢ dividend-portal... done
yoshikouki commented 3 years ago

参考URL https://takagi.blog/switching-database-in-heroku-from-hobby-dev-to-hobby-basic/

yoshikouki commented 3 years ago

変更後の heroku コンパネ PixelSnap 2021-09-15 at 22 23 41@2x

yoshikouki commented 3 years ago

render というポスト heroku とも呼ばれているサービスを検討したが、結局 heroku になった

https://dashboard.render.com/

Twitter Gem が依存している idn-ruby という Gem の Linux ライブラリのインストールがだるかったため。 Node.js に移行する際には検討してもいいかも