Is there a working nodejs/phantomjs Heroku buildpack?

后端 未结 6 915
抹茶落季
抹茶落季 2020-12-13 16:27

I\'d like to deploy an app with a Procfile that runs

web: node myapp.js

Where myapp.js uses phantomjs-node to run headless web

相关标签:
6条回答
  • 2020-12-13 16:55

    Here's a PhantomJS buildpack: https://github.com/stomita/heroku-buildpack-phantomjs

    I also am able to run the x86_64 build of PhamtomJS, just stuck in my app's vendor directory:

    http://phantomjs.org/download.html

    0 讨论(0)
  • 2020-12-13 17:01

    Checkout my modified version of stomita that includes NodeJS, PhantomJS & CasperJS ready to run. https://github.com/olragon/heroku-buildpack-nodejs

    0 讨论(0)
  • 2020-12-13 17:08

    This is an old thread but for anybody that lands here I have created a working buildpack for Node and Phantom that's a fork of the official Heroku Node buildpack which incorporates the build scripts from Beedesk's custom Phantom buildpack. Here it is https://github.com/datamail/heroku-buildpack-nodejs-phantomjs

    0 讨论(0)
  • 2020-12-13 17:09

    Heroku Toolbelt now has first class support for multiple buildpacks, so you can get a working Node and PhantomJS setup with the following:

    heroku buildpacks:set https://github.com/heroku/heroku-buildpack-nodejs.git

    heroku buildpacks:add --index 1 https://github.com/stomita/heroku-buildpack-phantomjs.git

    0 讨论(0)
  • 2020-12-13 17:10

    I also ran into the same problem, the way I fixed it was by using this "Multiple Buildpack" Buildpack. Then in my .buildpacks file I put the following:

    http://github.com/heroku/heroku-buildpack-nodejs.git
    http://github.com/stomita/heroku-buildpack-phantomjs.git
    

    Finally, you want to add PhantomJS to the path

    heroku config:set PATH=$PATH:vendor/phantomjs/bin
    

    I hope this helps.

    0 讨论(0)
  • 2020-12-13 17:10

    I have forked @stomita buildpack to use the official linux build binary from phantomJS.org. I tested it and it is working with heroku.

    Hope some security paranoids like me out there will find it useful.

    https://github.com/beedesk/heroku-buildpack-phantomjs

    The disadvantage of my pack it that, unlike stomita's, it doesn't include fontconfig and freetype. But, PhantomJS should work without them.

    0 讨论(0)
提交回复
热议问题