Refactor logging configuration in ApplicationDeploymentJob.php
This commit is contained in:
@@ -837,14 +837,6 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
'networks' => [
|
'networks' => [
|
||||||
$this->destination->network,
|
$this->destination->network,
|
||||||
],
|
],
|
||||||
'logging' => [
|
|
||||||
'driver' => 'fluentd',
|
|
||||||
'options' => [
|
|
||||||
'fluentd-address' => "tcp://127.0.0.1:24224",
|
|
||||||
'fluentd-async' => "true",
|
|
||||||
'fluentd-sub-second-precision' => "true",
|
|
||||||
]
|
|
||||||
],
|
|
||||||
'healthcheck' => [
|
'healthcheck' => [
|
||||||
'test' => [
|
'test' => [
|
||||||
'CMD-SHELL',
|
'CMD-SHELL',
|
||||||
@@ -872,6 +864,17 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
ray($this->server->isDrainLogActivated());
|
||||||
|
if ($this->server->isDrainLogActivated()) {
|
||||||
|
$docker_compose['services'][$this->container_name]['logging'] = [
|
||||||
|
'driver' => 'fluentd',
|
||||||
|
'options' => [
|
||||||
|
'fluentd-address' => "tcp://127.0.0.1:24224",
|
||||||
|
'fluentd-async' => "true",
|
||||||
|
'fluentd-sub-second-precision' => "true",
|
||||||
|
]
|
||||||
|
];
|
||||||
|
}
|
||||||
if ($this->application->isHealthcheckDisabled()) {
|
if ($this->application->isHealthcheckDisabled()) {
|
||||||
data_forget($docker_compose, 'services.' . $this->container_name . '.healthcheck');
|
data_forget($docker_compose, 'services.' . $this->container_name . '.healthcheck');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -308,6 +308,9 @@ class Server extends BaseModel
|
|||||||
{
|
{
|
||||||
return $this->settings->is_reachable && $this->settings->is_usable;
|
return $this->settings->is_reachable && $this->settings->is_usable;
|
||||||
}
|
}
|
||||||
|
public function isDrainLogActivated() {
|
||||||
|
return $this->settings->is_logdrain_newrelic_enabled || $this->settings->is_logdrain_highlight_enabled || $this->settings->is_logdrain_axiom_enabled;
|
||||||
|
}
|
||||||
public function validateConnection()
|
public function validateConnection()
|
||||||
{
|
{
|
||||||
$uptime = instant_remote_process(['uptime'], $this, false);
|
$uptime = instant_remote_process(['uptime'], $this, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user