Self-host on Heroku

A few things off the top of reading the code for deployment providers:

  1. We’d need a way to move @redwoodjs/core from being a dev to prod dependency in the root package.json as part of the deploy provider. This enables running db up as part of the release phase in Heroku, which happens after dev dependencies have been pruned. I’d love feedback on the best way to tackle this.
  2. We’d need a way to add pm2 to the root package.json - looks like only the api workspace can get packages added in a deploy step. I’m tempted to remove the pm2 dependency, and use child_process or a bash script to start the redwood app and, once running, touch the file necessary to signal to the NGinx buildpack that our app is running. I’d love thoughts on this as well.
  3. We’d need a way to add the build script to package.json. No way around that, unless yarn build automatically maps to rw build in a vanilla Redwood project and I missed that.

Welcome anywhere I’m missing something, as I’m very new to Redwood as a whole.

1 Like