Heroku NodeJS app using OpenCV

后端 未结 2 1819
挽巷
挽巷 2021-01-22 21:23

I have tried so many buildpacks and googled so many SO articles, but I just cannot deploy my NodeJS app. All buildpacks are out-of-date for 2+ years and none of them work.

相关标签:
2条回答
  • 2021-01-22 22:07

    I ran into the exact same issue -- here's what worked for me:

    If your stack is heroku-16, these are the Heroku buildpacks you want to add (in this particular order!):

    • https://github.com/Starkast/heroku-buildpack-cmake.git
    • https://github.com/onboardiq/heroku16-buildpack-opencv3.git
    • heroku/nodejs

    0 讨论(0)
  • 2021-01-22 22:13

    So, it is very well known that once you give up and post a question to SO, the solution eventually comes up!

    # NodeJS buildpack
    
    $ heroku buildpacks:add heroku/nodejs
    
    # OpenCV builbpack
    
    $ heroku buildpacks:add --index 1 https://github.com/automata/heroku-buildpack-opencv.git
    
    # Downgrade to Cedar 14
    # since on Cedar 16 it won't work without extra configurations
    
    $ heroku stack:set cedar-14
    
    # Push to Heroku
    
    $ git push heroku
    
    # After deploying your app may scale down to 0 dynos
    # ... so increase dynos amount to the desired number
    
    $ heroku ps:scale web=1
    

    Perfect for a hobby project!

    Note: if you have multiple apps, simply add --app YOUR-APP-NAME to the end of each command.

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