Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fteychene/dokku-build-hook
Dokku plugin to add hook on build in applications.
https://github.com/fteychene/dokku-build-hook
Last synced: about 1 month ago
JSON representation
Dokku plugin to add hook on build in applications.
- Host: GitHub
- URL: https://github.com/fteychene/dokku-build-hook
- Owner: fteychene
- Created: 2016-10-20T08:57:23.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-16T13:53:53.000Z (over 4 years ago)
- Last Synced: 2024-08-02T12:50:25.307Z (4 months ago)
- Language: Shell
- Size: 4.88 KB
- Stars: 7
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-starred - fteychene/dokku-build-hook - Dokku plugin to add hook on build in applications. (others)
README
# Dokku build hook
*Add hook for application to prepare build*
This plugin aim applications that requires to run some commands before build and offer a way to run these commands in dokku build lifecycle.
## Installation
```shell
# on 0.3.x
cd /var/lib/dokku/plugins
git clone https://github.com/fteychene/dokku-build-hook.git build-hook
dokku plugins-install# on 0.4.x
dokku plugin:install https://github.com/fteychene/dokku-build-hook.git build-hook
```## Usage
The plugin will search for scripts in application codebase to be executed on different phases of the build.
By default, the scripts should be installed in a `hooks` directory in the project codebase and be named as the corresponding hook you want to trigger.
Hooks :
- [x] pre-build : This script will be executed before the build of the project (Buildpack or Dockerfile based)### Configuration
The folder where scripts are loaded could be overrided by setting `HOOKS_DIR` configuration for application
## Example
Add a script `hooks/pre-build` in a dokku project.
```bash
#!/usr/bin/env bashecho "Run something before dokku build the project"
```When deploying you app to dokku you should see the following instructions before build
```
-----> Checking for pre-build script
=====> Running pre-build script
Run something before dokku build the project
=====> End of pre-build script
```