ember-learn / deprecation-app

Deprecation guides for ember.js, ember-data, and ember-cli
https://deprecations.emberjs.com/
22 stars 69 forks source link

Deployment issues #97

Closed sivakumar-kailasam closed 5 years ago

sivakumar-kailasam commented 6 years ago

The heroku ember.js buildpack builds this app with prember using ember-cli-deploy. After the build since it notices ember-cli-fastboot in dependencies it assumes that we'd like to serve it as one and starts a fastboot server. This behavior causes issues in our app. What we'd like is for it to just deploy it static mode using heroku static buildpack internally like it would if the fastboot dependency wasn't declared.

We could use the static buildpack instead of the emberjs buildpack. The problem is that we need a build step using the node build pack to let it know which directory to serve. The only hook that we're aware of atm we could use to do this is postinstall in package.json. This didn't work for us in our attempts.

Making the emberjs buildpack understand that this is a static app by looking up premberin app dependencies or using an env variable is one step towards making this work. We would additionally need for the buildpack to use our static.json which would define our error file to use, which is important for certain urls from the old app to work. This is a requirement to use this app with prember.

Alternatives are,

  1. Remove prember temporarily and go live with fastboot mode. Least effort on infra site but needs testing of the app.
  2. Temporarily use netlify but this is troublesome when it comes to managing apps.

We could temporarily go with either solutions to go live while we work with terrance from heroku to figure out how to solve this to have this hosted on heroku with prember.

mansona commented 6 years ago

(I'm just adding a link here for other people to keep up with the conversation)

I took a look at this yesterday and have (hopefully) solved it by forking the static buildpack and creating a heroku-buildpack-ember-static which builds your ember app during the compile step and then just serves the dist folder exactly as the standard static buildpack does.

The PR that implements this is here: https://github.com/ember-learn/deprecation-app/pull/98

sivakumar-kailasam commented 5 years ago

We started using prember & now we deploy to netlify. So we're no longer affected by this