Skip to content

Commit be60299

Browse files
committed
Send correct container to daemon
1 parent 34d5e81 commit be60299

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/Repositories/ServerRepository.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public function create(array $data)
9494
'option_id' => 'required|numeric|min:1|exists:service_options,id',
9595
'location_id' => 'required|numeric|min:1|exists:locations,id',
9696
'pack_id' => 'sometimes|nullable|numeric|min:0',
97+
'custom_container' => 'string',
9798
'startup' => 'string',
9899
'auto_deploy' => 'sometimes|boolean',
99100
'custom_id' => 'sometimes|required|numeric|unique:servers,id',
@@ -256,7 +257,7 @@ public function create(array $data)
256257
'pack_id' => $data['pack_id'],
257258
'startup' => $data['startup'],
258259
'daemonSecret' => $uuid->generate('servers', 'daemonSecret'),
259-
'image' => (isset($data['custom_container'])) ? $data['custom_container'] : $option->docker_image,
260+
'image' => (isset($data['custom_container']) && ! empty($data['custom_container'])) ? $data['custom_container'] : $option->docker_image,
260261
'username' => $this->generateSFTPUsername($data['name'], $genShortUuid),
261262
'sftp_password' => Crypt::encrypt('not set'),
262263
]);

0 commit comments

Comments
 (0)