Skip to content

Commit

Permalink
Fix starting task because of worker
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Aug 26, 2024
1 parent 6620d0c commit 6170f29
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .castor/docker.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function about(): void
if ("frontend-{$projectName}" === $router['service']) {
continue;
}
if (!preg_match('{^Host\\(`(?P<hosts>.*)`\\)$}', $router['rule'], $matches)) {
if (!preg_match('{^Host\(`(?P<hosts>.*)`\)$}', $router['rule'], $matches)) {
continue;
}
$hosts = explode('`) || Host(`', $matches['hosts']);
Expand Down Expand Up @@ -79,6 +79,11 @@ function build(
if ($profile) {
$command[] = '--profile';
$command[] = $profile;
} else {
$command[] = '--profile';
$command[] = 'default';
$command[] = '--profile';
$command[] = 'worker';
}

$command = [
Expand Down Expand Up @@ -530,7 +535,6 @@ function run_in_docker_or_locally_for_mac(string $command, ?Context $c = null):
}
}


/**
* Find worker containers for the current project.
*
Expand Down
2 changes: 1 addition & 1 deletion castor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions infrastructure/docker/docker-compose.worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ x-services-templates:
- "docker-starter.worker.${PROJECT_NAME}=true"
profiles:
- default
- worker

# services:
# worker_messenger:
Expand Down

0 comments on commit 6170f29

Please sign in to comment.