Merge pull request #8157 from dokku/7102-buildpacks-app-json

Add support for specifying buildpacks via app.json
This commit is contained in:
Jose Diaz-Gonzalez
2026-04-26 04:07:14 -04:00
committed by GitHub
12 changed files with 297 additions and 16 deletions

View File

@@ -5,6 +5,25 @@
> [!IMPORTANT]
> While the `app.json` format used by Dokku is based on the one [supported by Heroku](https://devcenter.heroku.com/articles/app-json-schema), not all Heroku functionality is supported by Dokku.
## Buildpacks
```json
{
"buildpacks": [
{
"url": "heroku/python"
},
{
"url": "https://github.com/heroku/heroku-buildpack-nodejs.git"
}
]
}
```
(list, optional) A list of buildpacks to use when deploying the app. Each entry is an object with a `url` property. Buildpacks specified via the `buildpacks:add` or `buildpacks:set` commands take precedence over those specified in `app.json`. Buildpack URLs may use the shorthand format (e.g., `heroku/python`) which will be expanded to the full GitHub URL.
- `url`: (string, required) The URL or shorthand reference of the buildpack.
## Cron
```json

View File

@@ -130,6 +130,24 @@ This will use the latest commit on the `master` branch of the specified buildpac
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-nodejs#v87
```
### Specifying buildpacks via app.json
Buildpacks can also be specified in the `app.json` file at the root of your repository:
```json
{
"buildpacks": [
{
"url": "heroku/python"
}
]
}
```
Buildpacks configured via `buildpacks:add` or `buildpacks:set` commands take precedence over those specified in `app.json`. If no buildpacks are configured via commands and `app.json` contains a `buildpacks` entry, those buildpacks will be used.
Shorthand buildpack references (e.g., `heroku/python`) are expanded to full GitHub URLs automatically.
### Displaying buildpack reports for an app
You can get a report about the app's buildpacks status using the `buildpacks:report` command: