-
Notifications
You must be signed in to change notification settings - Fork 76
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
Improve libvips support for Heroku? #32
Comments
This seems like the most recently updated buildpack: The README says it's using libvips version 8.0.0, but a month ago, there was a commit that bumped it to version 8.6.2 (but they forgot to update the README). The latest official libvips release is 8.6.3, so that's basically current. |
@mokolabs I agree, we should definitely do a writeup on that. Though I'm wondering whether a better place for Heroku instructions would be the ruby-vips wiki (where we would link to from here). |
@janko-m Sweet. Yeah, it definitely makes more sense that the guide lives over in that repo. For starters, I forked the most recently updated buildpack, then renamed it and updated the README: But I'm really thinking about starting from scratch with a brand new modern buildpack that isn't a fork. |
Wow, that buildpack has some deep level of forks 😃. In any case, that sounds good to me! |
Okay, so I've got two repos for this now. The first is a slightly tweaked version of the most recently updated vips buildpack: I'll be using that just for testing and to see how the existing buildpacks work in practice. The second repo is for the brand new buildpack: I'm also going with |
Hey guys, I've forked the buildpack at zoras/heroku-buildpack-libvips and made it work for myself. Can you guys checkout if it works the same for you? Feedbacks appreciated :) https://elements.heroku.com/buildpacks/zoras/heroku-buildpack-libvips |
@zoras Cool, thanks a lot for making it! I will have a chance to try it out soon, and will let you know how it worked for me. |
@zoras I tried your package but I am getting this error during the build
I think I followed the instructions by installing both the |
Hey @zoras! You can try this one https://github.com/kinfamilies/heroku-buildpack-vips |
@adrienpoly Duh! I linked the kespry github (fixed now). My fork is at https://github.com/zoras/heroku-buildpack-libvips and the buildpack registry should be https://buildpack-registry.s3.amazonaws.com/buildpacks/zoras/heroku-buildpack-libvips.tgz @bibendi Awesome! |
Thanks for sharing your buildpacks! I’m going to close this issue since it seems we have working buildpacks now, but feel free to continue commenting here. |
If we have the launchpad PPA for all recent Ubuntu versions, then life would be easier. 😸 I have tried, but gave up. |
Using @zoras 's suggestion I tried to push to heroku, but I'm getting:
Looks like https://kespry-packages.s3.amazonaws.com/vips/heroku-18/libvips-8.6.2.tgz is no longer accessible. How to resolve this? cc. @bibendi Thank you! |
I would download libvips tarballs from github, eg.: https://github.com/libvips/libvips/releases/download/v8.8.1/vips-8.8.1.tar.gz Please use the most recent version, it has various security fixes, see the changelog. |
Thank you @jcupitt and sorry for my ignorance, but how do I use this link? Do I fork the zoras' buildpack and replace the broken link with yours? |
Sorry, no idea :( I've not done much with heroku. We need an expert to help. I did make this: https://github.com/jcupitt/docker-builds/tree/master/libvips-heroku18 Which builds a basic libvips for heroku18 in docker, but it would need some work to make it into a bullet or slug or whatever they call it. I noticed @zoras (in his excellent buildpack) is adding cfitsio support. I would not enable this myself -- I don't think it has been fuzzed for untrusted files. libvips is part of https://github.com/google/oss-fuzz/tree/master/projects/libvips |
Not sure if this will solve your case @iraszl, but I had a similar issue with the chain of buildpacks that seemed built to support libvips on Heroku. After trial / error with a few, this is the one that worked for me:
|
@krnjn Worked! Thanks so much for your kind attention to the matter. |
Oh, I'm glad Brandon made that. I would bump the libvips version though -- he's still using 8.7.1. |
Can you guys confirm the above fully work for you? For me the VIPS part works great, but now my app isn't loading CSS and JS. Locally it works, but not on Heroku, so I assume it's related to the buildpack configuration:
Do you guys have any ideas for me to try to fix it? |
@iraszl try |
hi @matpowel have you actually had any luck with installing through Apt buildpack ? |
@maxence33 no, I remember we tried the pure APT method and it didn't work. I can't remember exactly what the issue was. We ended up with this in the Aptfile:
And then the official Heroku Apt and BrandonCC's Vips buildpack (https://github.com/brandoncc/heroku-buildpack-vips) |
Thank you @matpowel , will try to replicate your setup with Brandoncc buildpack |
Has anyone managed to git
|
@schneems we never got it working, we're moving to our own slug/docker image but at the moment we are still using the brandoncc buildpack and then APT to install some of the libs per my previous post |
Scratch that, apparently this works:
|
@schneems does that really work? That's the first attempt we made and it didn't work for ActiveStorage etc |
Looks like it's working for me:
|
I tried Aptfile @schneems wrote , but I got error like following. We need libvips 8.6+ but the Aptfile gets 8.4.5.
|
@willnet if this was on plain linux or docker how would you get that version of libvips on the box? Heroku's "just linux" with some stuff on top of it. Heroku 18 is Ubuntu18 etc. Is there an apt repository that has taht version of libvips? |
Worth mentioning that it looks like the above script no longer works on heroku-20. It looks like |
I just upgraded a Rails 6 app to Rails 7. The app was already using APT and Vips buildpacks + Aptfile as suggested in this thread. Now with Rails 7 using Vips by default instead of mini magick, is this still needed or can the Heroku setup be simplified? It is not mentioned in the docs. |
I recently opened a support ticket with Heroku on this and got the following response:
@sedubois if you have the time and inclination, please send them a support request. It'd be great to get libvips as part of the standard ruby stack at Heroku, but they apparently aren't in any rush without more input from their customers. |
Is there such thing as a Ruby stack ? Maybe they can add it to Heroku 22. I guess VIPS has become mainframe in a lot of environments. |
We're looking to add it to the heroku-22 stack. Adding it to heroku-18 or heroku-20 isn't viable. Even putting it in heroku-22 comes with some non-trivial concerns. In the short term it seems there's a buildpack that can be used that's partially maintained by a libvips contributor heroku/heroku-buildpack-ruby#1200 (comment) |
That would be awesome, @schneems! |
On Heroku-22, I did not need
|
@schneems does that mean it got added to Heroku-22? |
https://devcenter.heroku.com/articles/stack-packages has |
I'm ultimately planning to deploy my new image_processing app to Heroku.
Since libvips isn't included in the default package list on Heroku stacks, I will need to install a custom buildpack before I deploy my app.
There are quite a few libvips buildpacks on Heroku already:
https://elements.heroku.com/search/buildpacks?q=libvips
But I'm not sure which is best. Plus they all seem outdated. The most popular uses version 7.42.3, but that's over five years old. The newest buildpack uses 8.0.0, but that's almost 3 years old.
I'd like to see...
Why do this? We should make it super easy to use libvips with image_processing on Heroku. Right now, our story is "libvips support is amazing, but it's kind of a pain to deploy to Heroku". If we create a new buildpack, the story will be "libvips is amazing and it's easy to deploy to Heroku using our custom buildpack".
The buildpack, of course, should be its own Github project. I'm happy to host it, but I'm certainly not an expert on Ubuntu package management and library compilation, so I'd love some help from others who may know more about that stuff than me. (I can also help with testing and documentation).
Thoughts?
The text was updated successfully, but these errors were encountered: