datamade / how-to

📚 Doing all sorts of things, the DataMade way
MIT License
81 stars 12 forks source link

Separate production deployment into its own section #199

Closed hancush closed 2 years ago

hancush commented 3 years ago

Documentation request

Creating a production deployment from our templated artifacts will not result in production grade resources. Let's break production deployment into its own step and specify how to update the artifacts to create the appropriate flavor of app dyno and addons. This will entail clarifying the relationship, if any, between app.json and heroku.yml, as well as updating app.json to specify addons in the appropriate block.

hancush commented 2 years ago

When we create a production app, we'll create a heroku.yml.production file that captures the add-on plans and use it to create the app. The heroku.yml file under version control should contain the plans for staging, i.e., free plans.

hancush commented 2 years ago

I drafted this but I'm actually not happy with the result. It doesn't seem like you can specify dyno in the heroku.yml file, so it wouldn't be preserved under version control. OTOH, it's pretty annoying to upgrade from the free database plan to a paid one, because you have to manually copy and restore, so I do like that creating the production app from an updated file allows you to skip that step. Ambivalent.

hancush commented 2 years ago

We want to prefer a simpler deployment, so I'll update the docs and add a step to upgrade your prod dyno and database before launch and roll back the other changes.