From be60299089efe112a1deaa4551254ae2ca0553c1 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Thu, 16 Mar 2017 20:49:11 -0400 Subject: [PATCH] Send correct container to daemon --- app/Repositories/ServerRepository.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Repositories/ServerRepository.php b/app/Repositories/ServerRepository.php index adf05a293..5ffbe65c2 100644 --- a/app/Repositories/ServerRepository.php +++ b/app/Repositories/ServerRepository.php @@ -94,6 +94,7 @@ class ServerRepository 'option_id' => 'required|numeric|min:1|exists:service_options,id', 'location_id' => 'required|numeric|min:1|exists:locations,id', 'pack_id' => 'sometimes|nullable|numeric|min:0', + 'custom_container' => 'string', 'startup' => 'string', 'auto_deploy' => 'sometimes|boolean', 'custom_id' => 'sometimes|required|numeric|unique:servers,id', @@ -256,7 +257,7 @@ class ServerRepository 'pack_id' => $data['pack_id'], 'startup' => $data['startup'], 'daemonSecret' => $uuid->generate('servers', 'daemonSecret'), - 'image' => (isset($data['custom_container'])) ? $data['custom_container'] : $option->docker_image, + 'image' => (isset($data['custom_container']) && ! empty($data['custom_container'])) ? $data['custom_container'] : $option->docker_image, 'username' => $this->generateSFTPUsername($data['name'], $genShortUuid), 'sftp_password' => Crypt::encrypt('not set'), ]);