feat(Application): add networkAliases attribute for handling network aliases as JSON or comma-separated values
This commit is contained in:
@@ -1361,7 +1361,6 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
}
|
||||
}
|
||||
$this->application_deployment_queue->addLogEntry("Preparing container with helper image: $helperImage.");
|
||||
$this->application_deployment_queue->addLogEntry("Starting graceful shutdown container: {$this->deployment_uuid}");
|
||||
$this->graceful_shutdown_container($this->deployment_uuid);
|
||||
$this->execute_remote_command(
|
||||
[
|
||||
@@ -1710,6 +1709,11 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
]);
|
||||
$this->application->parseHealthcheckFromDockerfile($this->saved_outputs->get('dockerfile_from_repo'));
|
||||
}
|
||||
$network_aliases = [];
|
||||
if (is_array($this->application->network_aliases) && count($this->application->network_aliases) > 0) {
|
||||
$network_aliases = $this->application->network_aliases;
|
||||
}
|
||||
ray($network_aliases);
|
||||
$docker_compose = [
|
||||
'services' => [
|
||||
$this->container_name => [
|
||||
@@ -1721,7 +1725,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
$this->destination->network => [
|
||||
'aliases' => array_merge(
|
||||
[$this->container_name],
|
||||
$this->application->network_aliases ? explode(',', $this->application->network_aliases) : []
|
||||
$network_aliases
|
||||
),
|
||||
],
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user