Add support for creating network if it is missing
This commit is contained in:
12
wings.go
12
wings.go
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/remeh/sizedwaitgroup"
|
||||
"go.uber.org/zap"
|
||||
"net/http"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Entrypoint for the Wings application. Configures the logger and checks any
|
||||
@@ -70,6 +71,15 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
if err := ConfigureDockerEnvironment(c.Docker); err != nil {
|
||||
zap.S().Fatalw("failed to configure docker environment", zap.Error(errors.WithStack(err)))
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if err := c.WriteToDisk(); err != nil {
|
||||
zap.S().Errorw("failed to save configuration to disk", zap.Error(errors.WithStack(err)))
|
||||
}
|
||||
|
||||
// Just for some nice log output.
|
||||
for _, s := range server.GetServers().All() {
|
||||
zap.S().Infow("loaded configuration for server", zap.String("server", s.Uuid))
|
||||
@@ -143,7 +153,7 @@ func main() {
|
||||
}
|
||||
|
||||
r := &Router{
|
||||
token: c.AuthenticationToken,
|
||||
token: c.AuthenticationToken,
|
||||
upgrader: websocket.Upgrader{
|
||||
// Ensure that the websocket request is originating from the Panel itself,
|
||||
// and not some other location.
|
||||
|
||||
Reference in New Issue
Block a user