By soulchild
I was trying out App Platform to build my Jekyll blog : http://github.com/cupnoodle/mountain_goat , it requires npm to run the Gulpfile , but App Platform auto detects my repository as Jekyll site (which is correct), but I can’t add additional nodeJS buildpack and it can’t run npm command like npm run build.
Is it possible to add additional buildpack? Did I miss some configuration?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
This is possible to do today, but you’ll need to build using a Dockerfile, since we don’t yet support configuring multiple or overriding buildpacks on the App Platform.
I forked your repo and added a Dockerfile.build that looks like this:
FROM starefossen/ruby-node
ENV BUNDLER_VERSION=2.1.4
RUN gem install bundler -v ${BUNDLER_VERSION}
COPY . /app
WORKDIR /app
RUN bundle install && npm install && npm run build
We’re currently missing support in the UI for including an output_dir field that’s required for Dockerfile-based static builds, so you’ll need to submit using doctl and a spec YAML directly in the meantime. I added a .do/app.yaml file to the repo; you’ll want to use a similar one that looks like this:
name: mountain-goat
static_sites:
- name: site
github:
repo: cupnoodle/mountain_goat
branch: master
deploy_on_push: true
dockerfile_path: Dockerfile.build
output_dir: /app/_site
You can then create the app using doctl with:
doctl apps create --spec .do/app.yaml
@snormoredo has there been any change to the support for multiple/custom build packs?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.