2021-05-05 / @syui

heroku stackをheroku-20に移行する

elixir+phoenixで作ってるappが古いstack:heroku-16で動いてて、versionを上げろと言われてたので、heroku-20にしてみた。

The Heroku-16 stack is end-of-life This app is using the Heroku-16 stack, which reached end-of-life on May 1st, 2021. Apps using Heroku-16 no longer receive security updates, and from June 1st, 2021, builds will be disabled. Please upgrade your app to a newer Heroku stack. Visit here to learn more

https://help.heroku.com/0S5P41DC/heroku-16-end-of-life-faq

$ heroku git:clone -a $app
$ cd $app
$ heroku buildpacks:set hashnuke/elixir
elixir_version=1.9.0
release=true

これでpushしても以下のエラーが出るけど、cacheを削除すると動きます。

/app/.platform_tools/erlang/erts-10.6.4/bin/beam.smp: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

https://github.com/HashNuke/heroku-buildpack-elixir/issues/197

$ heroku plugins:install
$ heroku plugins
$ heroku builds:cache:purge
$ git push heroku master
tag: heroku