fix: custom docker compose commands, add project dir if needed
This commit is contained in:
parent
1e126dd2c3
commit
8af509992d
@ -347,9 +347,15 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
}
|
}
|
||||||
if (data_get($this->application, 'docker_compose_custom_start_command')) {
|
if (data_get($this->application, 'docker_compose_custom_start_command')) {
|
||||||
$this->docker_compose_custom_start_command = $this->application->docker_compose_custom_start_command;
|
$this->docker_compose_custom_start_command = $this->application->docker_compose_custom_start_command;
|
||||||
|
if (!str($this->docker_compose_custom_start_command)->contains('--project-directory')) {
|
||||||
|
$this->docker_compose_custom_start_command = str($this->docker_compose_custom_start_command)->replaceFirst('compose', 'compose --project-directory ' . $this->workdir)->value();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (data_get($this->application, 'docker_compose_custom_build_command')) {
|
if (data_get($this->application, 'docker_compose_custom_build_command')) {
|
||||||
$this->docker_compose_custom_build_command = $this->application->docker_compose_custom_build_command;
|
$this->docker_compose_custom_build_command = $this->application->docker_compose_custom_build_command;
|
||||||
|
if (!str($this->docker_compose_custom_build_command)->contains('--project-directory')) {
|
||||||
|
$this->docker_compose_custom_build_command = str($this->docker_compose_custom_build_command)->replaceFirst('compose', 'compose --project-directory ' . $this->workdir)->value();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($this->pull_request_id === 0) {
|
if ($this->pull_request_id === 0) {
|
||||||
$this->application_deployment_queue->addLogEntry("Starting deployment of {$this->application->name} to {$this->server->name}.");
|
$this->application_deployment_queue->addLogEntry("Starting deployment of {$this->application->name} to {$this->server->name}.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user