diff --git a/README.md b/README.md index 6c9af5b..a094959 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud). -_1126 TILs and counting..._ +_1127 TILs and counting..._ --- @@ -326,6 +326,7 @@ _1126 TILs and counting..._ ### Heroku +- [Deploy A Review App To A Different Stack](heroku/deploy-a-review-app-to-a-different-stack.md) - [Set And Show Heroku Env Variables](heroku/set-and-show-heroku-env-variables.md) ### HTML diff --git a/heroku/deploy-a-review-app-to-a-different-stack.md b/heroku/deploy-a-review-app-to-a-different-stack.md new file mode 100644 index 0000000..5cef8d2 --- /dev/null +++ b/heroku/deploy-a-review-app-to-a-different-stack.md @@ -0,0 +1,29 @@ +# Deploy A Review App To A Different Stack + +Heroku has different stacks for deploying apps. As newer versions of Linux +distros (such as Ubuntu) come out and software packages need patching and +updating, Heroku releases new stacks. And deprecates older ones. + +Before upgrading a production app to a new stack, you should test it out first. +The recommended way to test this out is with a Review App. + +If you need to bump the Ruby version or make any other changes, do that first. + +Then add or update your `app.json` file. This is a Heroku-specific file that +tells Heroku what stack to use when creating a new app or review app. + +```json +{ + "stack": "heroku-18" +} +``` + +Let's say my app is currently on the Heroku-16 stack. I can set the `stack` to +be `heroku-18` in `app.json`. Then I can push up a branch with all these +changes and turn it into a PR. From the Heroku dashboard, I can click the +Heroku Button that builds a Review App from the PR. + +Once it it finishes building and deploying, Heroku will give me a custom URL +for visiting the app so that I can manually evaluate it. + +[source](https://devcenter.heroku.com/articles/upgrading-to-the-latest-stack#testing-an-app-on-a-new-stack)