@@ -177,6 +177,7 @@ public function applications(Request $request)
177
177
'docker_compose_custom_build_command ' => ['type ' => 'string ' , 'description ' => 'The Docker Compose custom build command. ' ],
178
178
'docker_compose_domains ' => ['type ' => 'array ' , 'description ' => 'The Docker Compose domains. ' ],
179
179
'watch_paths ' => ['type ' => 'string ' , 'description ' => 'The watch paths. ' ],
180
+ 'use_build_server ' => ['type ' => 'boolean ' , 'nullable ' => true , 'description ' => 'Use build server. ' ],
180
181
],
181
182
)),
182
183
]),
@@ -279,6 +280,7 @@ public function create_public_application(Request $request)
279
280
'docker_compose_custom_build_command ' => ['type ' => 'string ' , 'description ' => 'The Docker Compose custom build command. ' ],
280
281
'docker_compose_domains ' => ['type ' => 'array ' , 'description ' => 'The Docker Compose domains. ' ],
281
282
'watch_paths ' => ['type ' => 'string ' , 'description ' => 'The watch paths. ' ],
283
+ 'use_build_server ' => ['type ' => 'boolean ' , 'nullable ' => true , 'description ' => 'Use build server. ' ],
282
284
],
283
285
)),
284
286
]),
@@ -381,6 +383,7 @@ public function create_private_gh_app_application(Request $request)
381
383
'docker_compose_custom_build_command ' => ['type ' => 'string ' , 'description ' => 'The Docker Compose custom build command. ' ],
382
384
'docker_compose_domains ' => ['type ' => 'array ' , 'description ' => 'The Docker Compose domains. ' ],
383
385
'watch_paths ' => ['type ' => 'string ' , 'description ' => 'The watch paths. ' ],
386
+ 'use_build_server ' => ['type ' => 'boolean ' , 'nullable ' => true , 'description ' => 'Use build server. ' ],
384
387
],
385
388
)),
386
389
]),
@@ -468,6 +471,7 @@ public function create_private_deploy_key_application(Request $request)
468
471
'manual_webhook_secret_gitea ' => ['type ' => 'string ' , 'description ' => 'Manual webhook secret for Gitea. ' ],
469
472
'redirect ' => ['type ' => 'string ' , 'nullable ' => true , 'description ' => 'How to set redirect with Traefik / Caddy. www<->non-www. ' , 'enum ' => ['www ' , 'non-www ' , 'both ' ]],
470
473
'instant_deploy ' => ['type ' => 'boolean ' , 'description ' => 'The flag to indicate if the application should be deployed instantly. ' ],
474
+ 'use_build_server ' => ['type ' => 'boolean ' , 'nullable ' => true , 'description ' => 'Use build server. ' ],
471
475
],
472
476
)),
473
477
]),
@@ -552,6 +556,7 @@ public function create_dockerfile_application(Request $request)
552
556
'manual_webhook_secret_gitea ' => ['type ' => 'string ' , 'description ' => 'Manual webhook secret for Gitea. ' ],
553
557
'redirect ' => ['type ' => 'string ' , 'nullable ' => true , 'description ' => 'How to set redirect with Traefik / Caddy. www<->non-www. ' , 'enum ' => ['www ' , 'non-www ' , 'both ' ]],
554
558
'instant_deploy ' => ['type ' => 'boolean ' , 'description ' => 'The flag to indicate if the application should be deployed instantly. ' ],
559
+ 'use_build_server ' => ['type ' => 'boolean ' , 'nullable ' => true , 'description ' => 'Use build server. ' ],
555
560
],
556
561
)),
557
562
]),
@@ -602,6 +607,7 @@ public function create_dockerimage_application(Request $request)
602
607
'name ' => ['type ' => 'string ' , 'description ' => 'The application name. ' ],
603
608
'description ' => ['type ' => 'string ' , 'description ' => 'The application description. ' ],
604
609
'instant_deploy ' => ['type ' => 'boolean ' , 'description ' => 'The flag to indicate if the application should be deployed instantly. ' ],
610
+ 'use_build_server ' => ['type ' => 'boolean ' , 'nullable ' => true , 'description ' => 'Use build server. ' ],
605
611
],
606
612
)),
607
613
]),
@@ -627,7 +633,7 @@ public function create_dockercompose_application(Request $request)
627
633
628
634
private function create_application (Request $ request , $ type )
629
635
{
630
- $ allowedFields = ['project_uuid ' , 'environment_name ' , 'server_uuid ' , 'destination_uuid ' , 'type ' , 'name ' , 'description ' , 'is_static ' , 'domains ' , 'git_repository ' , 'git_branch ' , 'git_commit_sha ' , 'private_key_uuid ' , 'docker_registry_image_name ' , 'docker_registry_image_tag ' , 'build_pack ' , 'install_command ' , 'build_command ' , 'start_command ' , 'ports_exposes ' , 'ports_mappings ' , 'base_directory ' , 'publish_directory ' , 'health_check_enabled ' , 'health_check_path ' , 'health_check_port ' , 'health_check_host ' , 'health_check_method ' , 'health_check_return_code ' , 'health_check_scheme ' , 'health_check_response_text ' , 'health_check_interval ' , 'health_check_timeout ' , 'health_check_retries ' , 'health_check_start_period ' , 'limits_memory ' , 'limits_memory_swap ' , 'limits_memory_swappiness ' , 'limits_memory_reservation ' , 'limits_cpus ' , 'limits_cpuset ' , 'limits_cpu_shares ' , 'custom_labels ' , 'custom_docker_run_options ' , 'post_deployment_command ' , 'post_deployment_command_container ' , 'pre_deployment_command ' , 'pre_deployment_command_container ' , 'manual_webhook_secret_github ' , 'manual_webhook_secret_gitlab ' , 'manual_webhook_secret_bitbucket ' , 'manual_webhook_secret_gitea ' , 'redirect ' , 'github_app_uuid ' , 'instant_deploy ' , 'dockerfile ' , 'docker_compose_location ' , 'docker_compose_raw ' , 'docker_compose_custom_start_command ' , 'docker_compose_custom_build_command ' , 'docker_compose_domains ' , 'watch_paths ' ];
636
+ $ allowedFields = ['project_uuid ' , 'environment_name ' , 'server_uuid ' , 'destination_uuid ' , 'type ' , 'name ' , 'description ' , 'is_static ' , 'domains ' , 'git_repository ' , 'git_branch ' , 'git_commit_sha ' , 'private_key_uuid ' , 'docker_registry_image_name ' , 'docker_registry_image_tag ' , 'build_pack ' , 'install_command ' , 'build_command ' , 'start_command ' , 'ports_exposes ' , 'ports_mappings ' , 'base_directory ' , 'publish_directory ' , 'health_check_enabled ' , 'health_check_path ' , 'health_check_port ' , 'health_check_host ' , 'health_check_method ' , 'health_check_return_code ' , 'health_check_scheme ' , 'health_check_response_text ' , 'health_check_interval ' , 'health_check_timeout ' , 'health_check_retries ' , 'health_check_start_period ' , 'limits_memory ' , 'limits_memory_swap ' , 'limits_memory_swappiness ' , 'limits_memory_reservation ' , 'limits_cpus ' , 'limits_cpuset ' , 'limits_cpu_shares ' , 'custom_labels ' , 'custom_docker_run_options ' , 'post_deployment_command ' , 'post_deployment_command_container ' , 'pre_deployment_command ' , 'pre_deployment_command_container ' , 'manual_webhook_secret_github ' , 'manual_webhook_secret_gitlab ' , 'manual_webhook_secret_bitbucket ' , 'manual_webhook_secret_gitea ' , 'redirect ' , 'github_app_uuid ' , 'instant_deploy ' , 'dockerfile ' , 'docker_compose_location ' , 'docker_compose_raw ' , 'docker_compose_custom_start_command ' , 'docker_compose_custom_build_command ' , 'docker_compose_domains ' , 'watch_paths ' , 'use_build_server ' ];
631
637
$ teamId = getTeamIdFromToken ();
632
638
if (is_null ($ teamId )) {
633
639
return invalidTokenResponse ();
@@ -665,6 +671,7 @@ private function create_application(Request $request, $type)
665
671
$ fqdn = $ request ->domains ;
666
672
$ instantDeploy = $ request ->instant_deploy ;
667
673
$ githubAppUuid = $ request ->github_app_uuid ;
674
+ $ useBuildServer = $ request ->use_build_server ;
668
675
669
676
$ project = Project::whereTeamId ($ teamId )->whereUuid ($ request ->project_uuid )->first ();
670
677
if (! $ project ) {
@@ -737,6 +744,8 @@ private function create_application(Request $request, $type)
737
744
$ application ->destination_id = $ destination ->id ;
738
745
$ application ->destination_type = $ destination ->getMorphClass ();
739
746
$ application ->environment_id = $ environment ->id ;
747
+ $ application ->settings ->is_build_server_enabled = $ useBuildServer ;
748
+ $ application ->settings ->save ();
740
749
$ application ->save ();
741
750
$ application ->refresh ();
742
751
if (! $ application ->settings ->is_container_label_readonly_enabled ) {
@@ -833,6 +842,8 @@ private function create_application(Request $request, $type)
833
842
$ application ->environment_id = $ environment ->id ;
834
843
$ application ->source_type = $ githubApp ->getMorphClass ();
835
844
$ application ->source_id = $ githubApp ->id ;
845
+ $ application ->settings ->is_build_server_enabled = $ useBuildServer ;
846
+ $ application ->settings ->save ();
836
847
$ application ->save ();
837
848
$ application ->refresh ();
838
849
if (! $ application ->settings ->is_container_label_readonly_enabled ) {
@@ -925,6 +936,8 @@ private function create_application(Request $request, $type)
925
936
$ application ->destination_id = $ destination ->id ;
926
937
$ application ->destination_type = $ destination ->getMorphClass ();
927
938
$ application ->environment_id = $ environment ->id ;
939
+ $ application ->settings ->is_build_server_enabled = $ useBuildServer ;
940
+ $ application ->settings ->save ();
928
941
$ application ->save ();
929
942
$ application ->refresh ();
930
943
if (! $ application ->settings ->is_container_label_readonly_enabled ) {
@@ -1004,6 +1017,8 @@ private function create_application(Request $request, $type)
1004
1017
$ application ->destination_id = $ destination ->id ;
1005
1018
$ application ->destination_type = $ destination ->getMorphClass ();
1006
1019
$ application ->environment_id = $ environment ->id ;
1020
+ $ application ->settings ->is_build_server_enabled = $ useBuildServer ;
1021
+ $ application ->settings ->save ();
1007
1022
1008
1023
$ application ->git_repository = 'coollabsio/coolify ' ;
1009
1024
$ application ->git_branch = 'main ' ;
@@ -1062,6 +1077,8 @@ private function create_application(Request $request, $type)
1062
1077
$ application ->destination_id = $ destination ->id ;
1063
1078
$ application ->destination_type = $ destination ->getMorphClass ();
1064
1079
$ application ->environment_id = $ environment ->id ;
1080
+ $ application ->settings ->is_build_server_enabled = $ useBuildServer ;
1081
+ $ application ->settings ->save ();
1065
1082
1066
1083
$ application ->git_repository = 'coollabsio/coolify ' ;
1067
1084
$ application ->git_branch = 'main ' ;
@@ -1404,6 +1421,7 @@ public function delete_by_uuid(Request $request)
1404
1421
'docker_compose_custom_build_command ' => ['type ' => 'string ' , 'description ' => 'The Docker Compose custom build command. ' ],
1405
1422
'docker_compose_domains ' => ['type ' => 'array ' , 'description ' => 'The Docker Compose domains. ' ],
1406
1423
'watch_paths ' => ['type ' => 'string ' , 'description ' => 'The watch paths. ' ],
1424
+ 'use_build_server ' => ['type ' => 'boolean ' , 'nullable ' => true , 'description ' => 'Use build server. ' ],
1407
1425
],
1408
1426
)),
1409
1427
]),
@@ -1460,7 +1478,7 @@ public function update_by_uuid(Request $request)
1460
1478
], 404 );
1461
1479
}
1462
1480
$ server = $ application ->destination ->server ;
1463
- $ allowedFields = ['name ' , 'description ' , 'is_static ' , 'domains ' , 'git_repository ' , 'git_branch ' , 'git_commit_sha ' , 'docker_registry_image_name ' , 'docker_registry_image_tag ' , 'build_pack ' , 'static_image ' , 'install_command ' , 'build_command ' , 'start_command ' , 'ports_exposes ' , 'ports_mappings ' , 'base_directory ' , 'publish_directory ' , 'health_check_enabled ' , 'health_check_path ' , 'health_check_port ' , 'health_check_host ' , 'health_check_method ' , 'health_check_return_code ' , 'health_check_scheme ' , 'health_check_response_text ' , 'health_check_interval ' , 'health_check_timeout ' , 'health_check_retries ' , 'health_check_start_period ' , 'limits_memory ' , 'limits_memory_swap ' , 'limits_memory_swappiness ' , 'limits_memory_reservation ' , 'limits_cpus ' , 'limits_cpuset ' , 'limits_cpu_shares ' , 'custom_labels ' , 'custom_docker_run_options ' , 'post_deployment_command ' , 'post_deployment_command_container ' , 'pre_deployment_command ' , 'pre_deployment_command_container ' , 'watch_paths ' , 'manual_webhook_secret_github ' , 'manual_webhook_secret_gitlab ' , 'manual_webhook_secret_bitbucket ' , 'manual_webhook_secret_gitea ' , 'docker_compose_location ' , 'docker_compose_raw ' , 'docker_compose_custom_start_command ' , 'docker_compose_custom_build_command ' , 'docker_compose_domains ' , 'redirect ' , 'instant_deploy ' ];
1481
+ $ allowedFields = ['name ' , 'description ' , 'is_static ' , 'domains ' , 'git_repository ' , 'git_branch ' , 'git_commit_sha ' , 'docker_registry_image_name ' , 'docker_registry_image_tag ' , 'build_pack ' , 'static_image ' , 'install_command ' , 'build_command ' , 'start_command ' , 'ports_exposes ' , 'ports_mappings ' , 'base_directory ' , 'publish_directory ' , 'health_check_enabled ' , 'health_check_path ' , 'health_check_port ' , 'health_check_host ' , 'health_check_method ' , 'health_check_return_code ' , 'health_check_scheme ' , 'health_check_response_text ' , 'health_check_interval ' , 'health_check_timeout ' , 'health_check_retries ' , 'health_check_start_period ' , 'limits_memory ' , 'limits_memory_swap ' , 'limits_memory_swappiness ' , 'limits_memory_reservation ' , 'limits_cpus ' , 'limits_cpuset ' , 'limits_cpu_shares ' , 'custom_labels ' , 'custom_docker_run_options ' , 'post_deployment_command ' , 'post_deployment_command_container ' , 'pre_deployment_command ' , 'pre_deployment_command_container ' , 'watch_paths ' , 'manual_webhook_secret_github ' , 'manual_webhook_secret_gitlab ' , 'manual_webhook_secret_bitbucket ' , 'manual_webhook_secret_gitea ' , 'docker_compose_location ' , 'docker_compose_raw ' , 'docker_compose_custom_start_command ' , 'docker_compose_custom_build_command ' , 'docker_compose_domains ' , 'redirect ' , 'instant_deploy ' , 'use_build_server ' ];
1464
1482
1465
1483
$ validator = customApiValidator ($ request ->all (), [
1466
1484
sharedDataApplications (),
@@ -1538,6 +1556,10 @@ public function update_by_uuid(Request $request)
1538
1556
}
1539
1557
$ instantDeploy = $ request ->instant_deploy ;
1540
1558
1559
+ $ use_build_server = $ request ->use_build_server ;
1560
+ $ application ->settings ->is_build_server_enabled = $ use_build_server ;
1561
+ $ application ->settings ->save ();
1562
+
1541
1563
removeUnnecessaryFieldsFromRequest ($ request );
1542
1564
1543
1565
$ data = $ request ->all ();
0 commit comments