fix: remove buildpacks from dockerfile test app and add tests for app.json buildpacks

The buildpacks entry in tests/apps/dockerfile/app.json caused
the post-extract trigger to write a .buildpacks file during
Dockerfile-based deploys, breaking builder detection. Remove
the entry and add Go unit tests for getBuildpacks/validBuildpackURL,
a bats integration test for deploying with app.json buildpacks,
and documentation for the new feature.
This commit is contained in:
Jose Diaz-Gonzalez
2026-04-18 05:43:44 -04:00
parent 44dbbe6a34
commit b0b11bcf26
8 changed files with 214 additions and 6 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: