progrium / buildpack-nginx

nginx buildpack
Creative Commons Zero v1.0 Universal
42 stars 115 forks source link

custom-build not picked up during build #7

Closed holmesal closed 10 years ago

holmesal commented 10 years ago

Hey! Awesome work with this buildpack.

I'm having some trouble getting custom-build to run. I've got a file called custom-build in my project root that looks like so:

#!/usr/bin/env bash

apt-get install nodejs
apt-get install npm

npm install && bower install && grunt build

And I've made that file executable. I'm able to run this file from inside the dokku container, but it's not being run as part of the build. Is there anything I need to do besides just having this file in my project root? I assumed the buildpack would pick it up (like .nginx)

Thanks!

ghost commented 10 years ago

Apologies for the late reply! I'm able to use custom-build successfully on the latest version of the buildpack (executable, in the root directory, committed). Just to make sure - by project root you mean the directory where .git lives and not in www? If so, could you check if you're up to date?

You should see

if [[ -e $1/${CUSTOM_BUILD:-custom-build} ]]; then
    $1/${CUSTOM_BUILD:-custom-build} "$@"
fi

If you're missing those lines you can download and import¹ a buildstep release or build the latest buildstep

1: curl -L <url from releases page> | gunzip -cd | docker import - progrium/buildstep

holmesal commented 10 years ago

Ah - turns out I wasn't building buildstep properly - importing the latest release worked like a charm.

Thanks!