refactor: move code for fetching an available port to the ports plugin
Also translate the code to golang.
This commit is contained in:
1 parent
121e4737a8
commit
192f7cf768
9 files changed
+59
-16
No files matched your search
@@ -35,6 +35,16 @@ func TriggerPortsGet(appName string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPortsGetAvailable prints out an available port greater than 1024
|
||||
func TriggerPortsGetAvailable() error {
|
||||
port := getAvailablePort()
|
||||
if port > 0 {
|
||||
common.Log(fmt.Sprint(port))
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostCertsRemove unsets port config vars after SSL cert is added
|
||||
func TriggerPostCertsRemove(appName string) error {
|
||||
keys := []string{"DOKKU_PROXY_SSL_PORT"}
|
||||
|
||||
Reference in new issue
Block a user