avoid panic from environment; ref pterodactyl/panel#2307
This commit is contained in:
@@ -143,6 +143,15 @@ func (e *Environment) Create() error {
|
||||
|
||||
a := e.Configuration.Allocations()
|
||||
|
||||
evs := e.Configuration.EnvironmentVariables()
|
||||
for i, v := range evs {
|
||||
// Convert 127.0.0.1 to the pterodactyl0 network interface if the environment is Docker
|
||||
// so that the server operates as expected.
|
||||
if v == "SERVER_IP=127.0.0.1" {
|
||||
evs[i] = "SERVER_IP="+config.Get().Docker.Network.Interface
|
||||
}
|
||||
}
|
||||
|
||||
conf := &container.Config{
|
||||
Hostname: e.Id,
|
||||
Domainname: config.Get().Docker.Domainname,
|
||||
|
||||
Reference in New Issue
Block a user