#90: Built auto-detection of shuffle network with orborus

This commit is contained in:
frikky
2020-07-08 03:35:14 +02:00
parent 987b393ae1
commit ab804a3fdc
2 changed files with 50 additions and 12 deletions
+4 -6
View File
@@ -347,17 +347,15 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env []
}
networkConfig := &network.NetworkingConfig{}
if baseUrl == "http://shuffle-backend:5001" {
shuffleNetwork := os.Getenv("DOCKER_NETWORK")
if len(shuffleNetwork) > 0 {
networkConfig = &network.NetworkingConfig{
EndpointsConfig: map[string]*network.EndpointSettings{
"shuffle_shuffle": {
NetworkID: "shuffle_shuffle",
shuffleNetwork: {
NetworkID: shuffleNetwork,
},
},
}
} else {
// FIXME: Default config
//log.Printf("Bad config: %s. Using default network", baseUrl)
}
cont, err := cli.ContainerCreate(