This commit is contained in:
Andras Bacsai 2024-01-11 14:25:55 +01:00
parent efa5dd28f1
commit cc1fb83c79
2 changed files with 0 additions and 5 deletions

View File

@ -744,7 +744,6 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
$this->build_image(); $this->build_image();
$this->stop_running_container(); $this->stop_running_container();
if ($this->application->destination->server->isSwarm()) { if ($this->application->destination->server->isSwarm()) {
ray("{$this->workdir}{$this->docker_compose_location}");
$this->push_to_docker_registry(); $this->push_to_docker_registry();
$this->execute_remote_command( $this->execute_remote_command(
[ [
@ -911,10 +910,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
if ($this->nixpacks_plan) { if ($this->nixpacks_plan) {
$parsed = Toml::Parse($this->nixpacks_plan); $parsed = Toml::Parse($this->nixpacks_plan);
// Do any modifications here // Do any modifications here
// $cmds = collect(data_get($parsed, 'phases.setup.cmds', []));
$this->generate_env_variables(); $this->generate_env_variables();
// data_set($parsed, 'phases.setup.cmds', $cmds);
ray($this->env_args->toArray());
$merged_envs = $this->env_args->merge(collect(data_get($parsed, 'variables', []))); $merged_envs = $this->env_args->merge(collect(data_get($parsed, 'variables', [])));
data_set($parsed, 'variables', $merged_envs->toArray()); data_set($parsed, 'variables', $merged_envs->toArray());
$this->nixpacks_plan = json_encode($parsed, JSON_PRETTY_PRINT); $this->nixpacks_plan = json_encode($parsed, JSON_PRETTY_PRINT);

View File

@ -109,7 +109,6 @@ class ExecuteContainerCommand extends Component
try { try {
// Wrap command to prevent escaped execution in the host. // Wrap command to prevent escaped execution in the host.
$cmd = 'sh -c "if [ -f ~/.profile ]; then . ~/.profile; fi; ' . str_replace('"', '\"', $this->command) . '"'; $cmd = 'sh -c "if [ -f ~/.profile ]; then . ~/.profile; fi; ' . str_replace('"', '\"', $this->command) . '"';
ray($cmd);
if (!empty($this->workDir)) { if (!empty($this->workDir)) {
$exec = "docker exec -w {$this->workDir} {$this->container} {$cmd}"; $exec = "docker exec -w {$this->workDir} {$this->container} {$cmd}";
} else { } else {