@@ -490,10 +490,10 @@ private function deploy_docker_compose_buildpack()
490
490
// Start compose file
491
491
if ($ this ->application ->settings ->is_raw_compose_deployment_enabled ) {
492
492
if ($ this ->docker_compose_custom_start_command ) {
493
+ $ this ->write_deployment_configurations ();
493
494
$ this ->execute_remote_command (
494
495
[executeInDocker ($ this ->deployment_uuid , "cd {$ this ->workdir } && {$ this ->docker_compose_custom_start_command }" ), 'hidden ' => true ],
495
496
);
496
- $ this ->write_deployment_configurations ();
497
497
} else {
498
498
$ this ->write_deployment_configurations ();
499
499
$ server_workdir = $ this ->application ->workdir ();
@@ -510,22 +510,21 @@ private function deploy_docker_compose_buildpack()
510
510
}
511
511
} else {
512
512
if ($ this ->docker_compose_custom_start_command ) {
513
+ $ this ->write_deployment_configurations ();
513
514
$ this ->execute_remote_command (
514
515
[executeInDocker ($ this ->deployment_uuid , "cd {$ this ->basedir } && {$ this ->docker_compose_custom_start_command }" ), 'hidden ' => true ],
515
516
);
516
- $ this ->write_deployment_configurations ();
517
517
} else {
518
518
$ command = "{$ this ->coolify_variables } docker compose " ;
519
519
if ($ this ->env_filename ) {
520
520
$ command .= " --env-file {$ this ->workdir }/ {$ this ->env_filename }" ;
521
521
}
522
522
$ command .= " --project-name {$ this ->application ->uuid } --project-directory {$ this ->workdir } -f {$ this ->workdir }{$ this ->docker_compose_location } up -d " ;
523
- ray ($ command );
524
523
524
+ $ this ->write_deployment_configurations ();
525
525
$ this ->execute_remote_command (
526
526
[executeInDocker ($ this ->deployment_uuid , $ command ), 'hidden ' => true ],
527
527
);
528
- $ this ->write_deployment_configurations ();
529
528
}
530
529
}
531
530
@@ -615,14 +614,14 @@ private function write_deployment_configurations()
615
614
$ this ->server = $ this ->original_server ;
616
615
}
617
616
if (str ($ this ->configuration_dir )->isNotEmpty ()) {
618
- ray ("docker cp {$ this ->deployment_uuid }: {$ this ->workdir } {$ this ->configuration_dir }" );
619
617
$ this ->execute_remote_command (
620
618
[
621
619
"mkdir -p $ this ->configuration_dir " ,
622
620
],
623
- [
624
- "rm -rf $ this ->configuration_dir /{*,.*} " ,
625
- ],
621
+ // removing this now as we are using docker cp
622
+ // [
623
+ // "rm -rf $this->configuration_dir/{*,.*}",
624
+ // ],
626
625
[
627
626
"docker cp {$ this ->deployment_uuid }: {$ this ->workdir }/. {$ this ->configuration_dir }" ,
628
627
],
0 commit comments