Ember-CLI Dokku Deployment: Buildpack? Copy Dist Folder? Pre-build Docker Image?

September 27, 2014 2.2k views

I'm looking to deploy Ember-CLI Apps using a Dokku Droplet.

Has anyone created a Dokku BuildPack for Ember?

Does running 'ember serve --environment production' locally allow you to just copy the Dist Folder?

Any help would be greatly appreciated. I have followed the Dokkku guide and can get an application live, just not ember-cli. If you could post as much regarding a potential solution and detailed steps that would be a great help. I've spent countless hours researching and looking into this problem but it's a topic not very well covered.

Is a procfile required/recommended?
If so, is this the correct input:
'web: ember serve --environment production --port $PORT'

Also the best/easiest option for to setup a Ruby on Rails backend API would be greatly appreciated


3 Answers

I used this buildpack successfully:
I just added an .env in the root directory of ember-cli project


Then I committed the code and pushed the project to my dokku host which was deployed successfully.

I found this fork, Which seems more active and maintained than

Just make .env file in ember-cli root folder with this line:


and then push the repository to your dokku.


I've got everything setup and working with Dokku using the sample application, however..

when adding the ".env" file to the root
---->(that contains=> export BUILDPACK_URL='',)

the website returns a "502 Bad Gateway" nginx response.

The app i'm trying to deploy is named mobile-patterns.

The .env is located at the root of this app.

Something that might be throwing it off is that even when following the stock instructions about deploying the sample app, it didn't deploy to the subdomain, but rather the root domain. This worked for the sample, but not the 'mobile-patterns' version.. Not sure if this causes conflict, but I want to deploy my application to the root, not a sub-domain. It's not working with my own app however...

Here's the log for the deploy..

-----> Cleaning up ...
-----> Building mobile-patterns ...
-----> Adding BUILD_ENV to build environment...
-----> Node.js app detected

   PRO TIP: Avoid using semver ranges starting with '>' in engines.node

-----> Requested node range: >= 0.10.0
-----> Resolved node version: 0.10.35
-----> Downloading and installing node
-----> Exporting config vars to environment
-----> Installing dependencies
-----> Cleaning up node-gyp and npm artifacts
-----> No Procfile found; Adding npm start to new Procfile
-----> Building runtime environment
-----> Discovering process types
Procfile declares types -> web
-----> Releasing mobile-patterns ...
-----> Deploying mobile-patterns ...
-----> Running pre-flight checks
check-deploy: /home/dokku/mobile-patterns/CHECKS not found. attempting to retrieve it from container ...
CHECKS file not found in container. skipping checks.
-----> Running post-deploy
-----> Creating new /home/dokku/mobile-patterns/VHOST...
-----> Configuring
-----> Creating http nginx.conf
-----> Running nginx-pre-reload
Reloading nginx
=====> Application deployed:

Thanks for the help.. Almost there!

Have another answer? Share your knowledge.