cris
cris

Reputation: 17

Deploy ember-cli and rails api

I'm looking for a way to deploy on Heroku a Rails API and an ember-cli application. My directories structure is something like that:

Can someone help me? I'm really new Heroku user.

PS: I don't want to use gems like 'ember-cli-rails'

Upvotes: 2

Views: 286

Answers (1)

andorov
andorov

Reputation: 4336

I would deploy them separately, and keep them in separate git repos.

Ember

Use ember-cli-deploy. I would suggest you look into the ember-cli-deploy-lightning-pack. There is a presentation about it here.

This automates the release process -

  • Builds your Ember app, with asset fingerprints
  • gzips the assets
  • Uploads changed files to AWS S3
  • Puts the full content of your index.html into Redis

Rails

  • deploy your rails-api app to heroku normally
  • include a redis addon
  • set up the route which serves index.html to query it directly from Redis instead
  • I would suggest aliasing all non-api routes (ie a catchall route) to the root route so you can 'deep link' to your ember app

A big advantage of this process is that you can deploy changes to your frontend very quickly, and without having to take down or restart the server.

Upvotes: 1

Related Questions