refactor(deployment): update environment file paths in docker compose commands to use working directory for improved consistency
This commit is contained in:
parent
60e31a1381
commit
7322072518
1 changed files with 6 additions and 6 deletions
|
|
@ -482,7 +482,7 @@ private function deploy_docker_compose_buildpack()
|
|||
if (filled($this->env_filename)) {
|
||||
$services = collect(data_get($composeFile, 'services', []));
|
||||
$services = $services->map(function ($service, $name) {
|
||||
$service['env_file'] = ["/artifacts/{$this->env_filename}"];
|
||||
$service['env_file'] = [$this->env_filename];
|
||||
|
||||
return $service;
|
||||
});
|
||||
|
|
@ -511,7 +511,7 @@ private function deploy_docker_compose_buildpack()
|
|||
} else {
|
||||
$command = "{$this->coolify_variables} docker compose";
|
||||
if (filled($this->env_filename)) {
|
||||
$command .= " --env-file /artifacts/{$this->env_filename}";
|
||||
$command .= " --env-file {$this->workdir}/{$this->env_filename}";
|
||||
}
|
||||
if ($this->force_rebuild) {
|
||||
$command .= " --project-name {$this->application->uuid} --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} build --pull --no-cache";
|
||||
|
|
@ -557,7 +557,7 @@ private function deploy_docker_compose_buildpack()
|
|||
|
||||
$command = "{$this->coolify_variables} docker compose";
|
||||
if (filled($this->env_filename)) {
|
||||
$command .= " --env-file /artifacts/{$this->env_filename}";
|
||||
$command .= " --env-file {$server_workdir}/{$this->env_filename}";
|
||||
}
|
||||
$command .= " --project-directory {$server_workdir} -f {$server_workdir}{$this->docker_compose_location} up -d";
|
||||
$this->execute_remote_command(
|
||||
|
|
@ -574,7 +574,7 @@ private function deploy_docker_compose_buildpack()
|
|||
$command = "{$this->coolify_variables} docker compose";
|
||||
if ($this->preserveRepository) {
|
||||
if (filled($this->env_filename)) {
|
||||
$command .= " --env-file /artifacts/{$this->env_filename}";
|
||||
$command .= " --env-file {$server_workdir}/{$this->env_filename}";
|
||||
}
|
||||
$command .= " --project-name {$this->application->uuid} --project-directory {$server_workdir} -f {$server_workdir}{$this->docker_compose_location} up -d";
|
||||
$this->write_deployment_configurations();
|
||||
|
|
@ -584,7 +584,7 @@ private function deploy_docker_compose_buildpack()
|
|||
);
|
||||
} else {
|
||||
if (filled($this->env_filename)) {
|
||||
$command .= " --env-file /artifacts/{$this->env_filename}";
|
||||
$command .= " --env-file {$this->workdir}/{$this->env_filename}";
|
||||
}
|
||||
$command .= " --project-name {$this->application->uuid} --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} up -d";
|
||||
$this->execute_remote_command(
|
||||
|
|
@ -1889,7 +1889,7 @@ private function generate_compose_file()
|
|||
],
|
||||
];
|
||||
if (filled($this->env_filename)) {
|
||||
$docker_compose['services'][$this->container_name]['env_file'] = ["/artifacts/{$this->env_filename}"];
|
||||
$docker_compose['services'][$this->container_name]['env_file'] = [$this->env_filename];
|
||||
}
|
||||
$docker_compose['services'][$this->container_name]['healthcheck'] = [
|
||||
'test' => [
|
||||
|
|
|
|||
Loading…
Reference in a new issue