feat: allow users to bind to all interfaces when a proxy is enabled
- use a plugin trigger to see whether we should bind to all interfaces - create a generic way of setting properties for a plugin - migrate proxy-enabled to the new network property "bind-all-interfaces" - add network:set subcommand
This commit is contained in:
committed by
Michael Hobbs
parent
7a4464a8ae
commit
acde3d60a7
22
plugins/network/src/subcommands/set/set.go
Normal file
22
plugins/network/src/subcommands/set/set.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
|
||||
common "github.com/dokku/dokku/plugins/common"
|
||||
network "github.com/dokku/dokku/plugins/network"
|
||||
)
|
||||
|
||||
// set or clear a network property for an app
|
||||
func main() {
|
||||
flag.Parse()
|
||||
appName := flag.Arg(1)
|
||||
property := flag.Arg(2)
|
||||
value := flag.Arg(3)
|
||||
|
||||
if property == "bind-all-interfaces" && value == "" {
|
||||
value = "false"
|
||||
}
|
||||
|
||||
common.CommandPropertySet("network", appName, property, value, network.ValidProperties)
|
||||
}
|
||||
Reference in New Issue
Block a user