-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathSoketi.php
49 lines (40 loc) · 1.26 KB
/
Soketi.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
namespace App\Services;
use App\Shell\Docker;
use App\Shell\Environment;
use App\Shell\QuayDockerTags;
use App\Shell\Shell;
class Soketi extends BaseService
{
protected static $category = Category::SOCKET;
protected $dockerTagsClass = QuayDockerTags::class;
protected $organization = 'quay.io';
protected $imageName = 'soketi/soketi';
protected $tag = 'latest-16-alpine';
protected $defaultPort = 6001;
protected $prompts = [
[
'shortname' => 'metrics_port',
'prompt' => 'Metrics server port',
'default' => '9601',
],
];
protected $dockerRunTemplate = '-p "${:port}":6001 \
-p "${:metrics_port}":9601 \
-e SOKETI_METRICS_ENABLED=1 \
"${:organization}"/"${:image_name}":"${:tag}"';
public function __construct(Shell $shell, Environment $environment, Docker $docker)
{
parent::__construct($shell, $environment, $docker);
$this->defaultPrompts = array_map(function ($prompt) {
if ($prompt['shortname'] === 'tag') {
$prompt['default'] = $this->tag;
}
return $prompt;
}, $this->defaultPrompts);
}
protected function shellCommand(): string
{
return 'sh';
}
}