Skip to content

Commit 5bae925

Browse files
author
Matthew Fisher
authored
Merge pull request #405 from bacongobbler/compile-hooks
doc(applications): add pre-compile/post-compile hook docs
2 parents 2e70f69 + 1cc7347 commit 5bae925

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/applications/using-buildpacks.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,21 @@ To use a custom buildpack, set the `BUILDPACK_URL` environment variable.
9999

100100
On your next `git push`, the custom buildpack will be used.
101101

102+
103+
## Compile Hooks
104+
105+
Sometimes, an application needs a way to stop or check if a service is running before building an
106+
app, and sometimes it requires notifying a service that the [Builder][] has finished compiling the
107+
app. In order to do this, an app can provide two files in their `bin/` directory:
108+
109+
```
110+
bin/pre-compile
111+
bin/post-compile
112+
```
113+
114+
The builder will run these commands before and after the build process, respectively.
115+
116+
102117
## Using Private Repositories
103118

104119
To pull code from private repositories, set the `SSH_KEY` environment variable to a private key

0 commit comments

Comments
 (0)