feat: add ability to set global properties
Not all properties can be set globally, and the "appName" in the global case is currently defaulted to `--global`. This is okay because domain label names cannot start with hyphens, and all app names must be valid domain label names.
This commit is contained in:
@@ -16,6 +16,9 @@ var (
|
||||
DefaultProperties = map[string]string{
|
||||
"restart-policy": "on-failure:10",
|
||||
}
|
||||
|
||||
// GlobalProperties is a map of all valid global ps properties
|
||||
GlobalProperties = map[string]bool{}
|
||||
)
|
||||
|
||||
// Rebuild rebuilds app from base image
|
||||
|
||||
@@ -163,7 +163,7 @@ func CommandSet(appName string, property string, value string) error {
|
||||
return dockeroptions.SetDockerOptionForPhases(appName, []string{"deploy"}, "restart", value)
|
||||
}
|
||||
|
||||
common.CommandPropertySet("ps", appName, property, value, DefaultProperties)
|
||||
common.CommandPropertySet("ps", appName, property, value, DefaultProperties, GlobalProperties)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user