1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-02 22:58:01 +00:00

Add Deploy A Review App To A Different Stack as a Heroku til

This commit is contained in:
jbranchaud
2021-05-29 18:44:15 -05:00
parent a979dc4253
commit 1bd0b023f1
2 changed files with 31 additions and 1 deletions

View File

@@ -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

View File

@@ -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)