feat: add support for specifying buildpacks via app.json

The order of detection is:

- buildpacks:set
- app.json
- .buildpacks
- auto-detected from codebase

Closes #7102
This commit is contained in:
Jose Diaz-Gonzalez
2025-11-23 01:39:14 -05:00
parent 996d882310
commit 5a787af3ae
6 changed files with 71 additions and 10 deletions

View File

@@ -26,6 +26,9 @@ var (
// AppJSON is a struct that represents an app.json file as understood by Dokku
type AppJSON struct {
// Buildpacks is a list of buildpacks to use for the app
Buildpacks []Buildpack `json:"buildpacks"`
// Cron is a list of cron tasks to execute
Cron []CronTask `json:"cron"`
@@ -51,6 +54,12 @@ type AppJSON struct {
} `json:"scripts"`
}
// Buildpack is a struct that represents a single buildpack
type Buildpack struct {
// URL is the URL of the buildpack
URL string `json:"url"`
}
// CronTask is a struct that represents a single cron task from an app.json file
type CronTask struct {
// Command is the command to execute