sibelius / heroku-buildpack-nodejs-bower-grunt

Custom Buildpack Node.js + Bower + Grunt
MIT License
0 stars 2 forks source link

Custom buildpack #1

Open lazydino opened 8 years ago

lazydino commented 8 years ago

We are running a node project that requires grunt during 'preinstall' of deployment and your buildpack should be just what we need. Our node project needs to interface with some legacy MONO .net module via Edge.JS ( https://github.com/tjanczuk/edge ) , so what I've been doing is tweak the base dokku container with mono runtime ( update DOKKU_IMAGE env variable ) to do the deployment. I probably did not do the right thing, and this hack won't work if I set BUILDPACK_URL to your build pack.

I would like to get rid of this hack on customizing gliderlabs/herokuish , and create a build pack based on yours to support MONO runtime. What do I need to do? Can you offer me some tips?

sibelius commented 8 years ago

@lazydino you should change this file - https://github.com/sibeliusseraphini/heroku-buildpack-nodejs-bower-grunt/blob/master/bin/compile

Obs.: this buildpack also install bower packages

let me know if this help you

lazydino commented 8 years ago

Thank you. I probably don't need to 'install edge js ' in the buildpack, I just need the buildpack to support MONO runtime, so node-gyp won't get crash during 'npm install' against my package.json.

sibelius commented 8 years ago

You will need to install some packages using apt-get, I think that there are some plugins or buildpack for this stuff

lazydino commented 8 years ago

Hi, I found this buildpack that builds edge js application with Heroku https://github.com/lastko/heroku-buildpack-edgejs , and I am testing it with your build pack as 'primary buildpack' which should do the app publishing in the final stage for dokku. My .buildpack is

https://github.com/lastko/heroku-buildpack-edgejs https://github.com/lazydino/heroku-buildpack-nodejs-bower-grunt.git

It is not building the app like in Heroku, and complain could not find 'npm'? It doesn't look like dokku is compatible with Heroku in this situation. Should I just merge the edgejs build pack into yours?

sibelius commented 8 years ago

have you tried to use https://github.com/ddollar/heroku-buildpack-multi?

I think a better approach is to merge the edgejs buildpack with this one, so you can have fine control

lazydino commented 8 years ago

Under heroku, my app build and run as per instructions mentioned at README documents of the build pack , For dokku, I created a .buildpacks file according to http://dokku.viewdocs.io/dokku/deployment/dockerfiles/#procfiles-and-multiple-processes , but it didn't work. I don't know what is the difference between using the heroku buildpack you mentioned and this .buildpack approach. To get even more confused, there is this dokku plugin that allows multi-pack support for dokku : https://github.com/pauldub/dokku-multi-buildpack ....

I am working with docker based delivery pipe-line either with dokku or deis. It is nice that it could work with Heroku, but I need my project to be wrapped as docker containers so I could have flexible ways to deploy them over the cloud like Google's Kubernetes. I want to find a solution without resolve to meddling with buildscripts...

sibelius commented 8 years ago

I've just moved to use only docker instead of dokku, the configuration is a little bit harder but you have much more control of your deploy system, I think you should try to do the same, if you are deploying on google compute or aws