Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom buildpack #1

Open
lazydino opened this issue Feb 24, 2016 · 7 comments
Open

Custom buildpack #1

lazydino opened this issue Feb 24, 2016 · 7 comments

Comments

@lazydino
Copy link

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
Copy link
Owner

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

  • Fork this repo
  • You should install edge (maybe npm install edge)
  • You should modify this line to personalize grunt to your needs

Obs.: this buildpack also install bower packages

let me know if this help you

@lazydino
Copy link
Author

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
Copy link
Owner

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

@lazydino
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants