feat: add support for formation key in app.json file
Still needs triggers for ps-can-scale and ps-scale-set. Refs #4500
This commit is contained in:
@@ -20,8 +20,9 @@ var (
|
||||
|
||||
// AppJSON is a struct that represents an app.json file as understood by Dokku
|
||||
type AppJSON struct {
|
||||
Cron []CronCommand `json:"cron"`
|
||||
Scripts struct {
|
||||
Cron []CronCommand `json:"cron"`
|
||||
Formation map[string]Formation `json:"formation"`
|
||||
Scripts struct {
|
||||
Dokku struct {
|
||||
Predeploy string `json:"predeploy"`
|
||||
Postdeploy string `json:"postdeploy"`
|
||||
@@ -36,6 +37,10 @@ type CronCommand struct {
|
||||
Schedule string `json:"schedule"`
|
||||
}
|
||||
|
||||
type Formation struct {
|
||||
Quantity int `json:"quantity"`
|
||||
}
|
||||
|
||||
// GetAppjsonDirectory returns the directory containing a given app's extracted app.json file
|
||||
func GetAppjsonDirectory(appName string) string {
|
||||
return filepath.Join(common.MustGetEnv("DOKKU_LIB_ROOT"), "data", "app-json", appName)
|
||||
|
||||
Reference in New Issue
Block a user