Send correct container to daemon

This commit is contained in:
Dane Everitt 2017-03-16 20:49:11 -04:00
parent 34d5e81b7a
commit be60299089
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -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'),
]);