Skip to content

Commit a135dde

Browse files
authored
Merge pull request alex88#21 from jklina/document-usage-dependencies
Explain how this is used with other buildpacks
2 parents 25c582d + c35b71c commit a135dde

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,39 @@ Heroku buildpack with [libvips](https://github.com/jcupitt/libvips) installed.
3434

3535
## Usage
3636

37-
Add this buildpack to your app:
37+
To use this on Heroku it must be installed with the required dependencies in the required order. We must first add the [apt buildpack](https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-apt) so that it is executed first. We can do that with the following Heroku CLI command:
3838

3939
```
40-
https://github.com/brandoncc/heroku-buildpack-vips
40+
heroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-apt
4141
```
4242

43+
Once added, you'll need to make sure that you create a file called `Aptfile` in the root of your project. The contents of this file need to be:
44+
45+
```
46+
libglib2.0-0
47+
libglib2.0-dev
48+
libpoppler-glib8
49+
```
50+
51+
These are dependencies required for this buildpack.
52+
53+
We can then add this buildpack by running:
54+
55+
```
56+
heroku buildpacks:add --index 2 https://github.com/brandoncc/heroku-buildpack-vips
57+
```
58+
59+
After running this command you should see the output similar to:
60+
61+
```
62+
Buildpack added. Next release on amazing-earthfest will use:
63+
1. heroku-community/apt
64+
2. https://github.com/brandoncc/heroku-buildpack-vips
65+
3. heroku/ruby
66+
```
67+
68+
The order is important as the `apt` buildpack and its dependencies must be installed before this buildpack. Finally the buildpack specifc to your application (in this case its the ruby buildpack) can be installed.
69+
4370
## Build script
4471

4572
[This](./build.sh) is the script used to build vips using docker.

0 commit comments

Comments
 (0)