From 6170f299f27b0ec4ce668acfcba896b7f6440690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Mon, 26 Aug 2024 10:56:58 +0200 Subject: [PATCH] Fix starting task because of worker --- .castor/docker.php | 8 ++++++-- castor.php | 2 +- infrastructure/docker/docker-compose.worker.yml | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.castor/docker.php b/.castor/docker.php index e7a7c1e..2606b7a 100644 --- a/.castor/docker.php +++ b/.castor/docker.php @@ -49,7 +49,7 @@ function about(): void if ("frontend-{$projectName}" === $router['service']) { continue; } - if (!preg_match('{^Host\\(`(?P.*)`\\)$}', $router['rule'], $matches)) { + if (!preg_match('{^Host\(`(?P.*)`\)$}', $router['rule'], $matches)) { continue; } $hosts = explode('`) || Host(`', $matches['hosts']); @@ -79,6 +79,11 @@ function build( if ($profile) { $command[] = '--profile'; $command[] = $profile; + } else { + $command[] = '--profile'; + $command[] = 'default'; + $command[] = '--profile'; + $command[] = 'worker'; } $command = [ @@ -530,7 +535,6 @@ function run_in_docker_or_locally_for_mac(string $command, ?Context $c = null): } } - /** * Find worker containers for the current project. * diff --git a/castor.php b/castor.php index 429fbb2..a3771d8 100644 --- a/castor.php +++ b/castor.php @@ -46,7 +46,7 @@ function start(): void // workers_stop(); generate_certificates(force: false); build(); - up(); + up(profiles: ['default']); // We can't start worker now, they are not installed cache_clear(); install(); migrate(); diff --git a/infrastructure/docker/docker-compose.worker.yml b/infrastructure/docker/docker-compose.worker.yml index e4a1115..5958878 100644 --- a/infrastructure/docker/docker-compose.worker.yml +++ b/infrastructure/docker/docker-compose.worker.yml @@ -12,6 +12,7 @@ x-services-templates: - "docker-starter.worker.${PROJECT_NAME}=true" profiles: - default + - worker # services: # worker_messenger: