Skip to content

Commit

Permalink
fix feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
joelwurtz committed May 3, 2024
1 parent 91c5947 commit 23573a0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
38 changes: 19 additions & 19 deletions .castor/docker.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,32 +355,32 @@ function push(): void
$registry = variable('registry');

$content = sprintf(<<<EOHCL
group "default" {
targets = [%s]
}
EOHCL
group "default" {
targets = [%s]
}
EOHCL
, implode(', ', array_map(fn ($target) => sprintf('"%s"', $target['target']), $targets)));


foreach ($targets as $target) {
$reference = str_replace('${REGISTRY:-}', $registry ?? '', $target['reference'] ?? '');

$content .= sprintf(<<<EOHCL
target "%s" {
context = "infrastructure/docker/%s"
dockerfile = "%s"
cache-from = ["%s"]
cache-to = ["type=%s,ref=%s,mode=max"]
target = "%s"
args = {
PHP_VERSION = "%s"
}
}
EOHCL
target "%s" {
context = "infrastructure/docker/%s"
dockerfile = "%s"
cache-from = ["%s"]
cache-to = ["type=%s,ref=%s,mode=max"]
target = "%s"
args = {
PHP_VERSION = "%s"
}
}
EOHCL
, $target['target'], $target['context'], $target['dockerfile'], $reference, $target['type'], $reference, $target['target'], variable('php_version'));
}

Expand Down
2 changes: 0 additions & 2 deletions infrastructure/docker/docker-compose.worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ x-services-templates:
volumes:
- "../..:/var/www:cached"
- "../../.home:/home/app:cached"
labels:
- "docker-starter.worker.${PROJECT_NAME}=true"
environment:
- HOME=/home/app
profiles:
Expand Down

0 comments on commit 23573a0

Please sign in to comment.