From c7b6e43a534e1057c1404112fec2edb9984ceca3 Mon Sep 17 00:00:00 2001 From: Matthieu Werner Date: Fri, 22 Sep 2023 14:22:47 +0200 Subject: [PATCH 1/2] Upgrade Traefik from 2 to 3 --- .castor/utils.php | 4 ++-- infrastructure/docker/services/router/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.castor/utils.php b/.castor/utils.php index f6bc8fd..c616b2f 100644 --- a/.castor/utils.php +++ b/.castor/utils.php @@ -39,7 +39,7 @@ function about(): void if (!preg_match('{^Host\\(`(?P.*)`\\)$}', $router['rule'], $matches)) { continue; } - $hosts = explode('`, `', $matches['hosts']); + $hosts = explode('`) || Host(`', $matches['hosts']); $urls = [...$urls, ...$hosts]; } } @@ -157,7 +157,7 @@ function docker_compose(array $subCommand, Context $c = null, bool $withBuilder $c ??= get_context(); $domains = [variable('root_domain'), ...variable('extra_domains')]; - $domains = '`' . implode('`, `', $domains) . '`'; + $domains = '`' . implode('`) || Host(`', $domains) . '`'; $c = $c ->withTimeout(null) diff --git a/infrastructure/docker/services/router/Dockerfile b/infrastructure/docker/services/router/Dockerfile index 8f78c64..cbd3f79 100644 --- a/infrastructure/docker/services/router/Dockerfile +++ b/infrastructure/docker/services/router/Dockerfile @@ -1,4 +1,4 @@ -FROM traefik:v2.7 +FROM traefik:v3.0 COPY traefik /etc/traefik From 873efe85216ae895ed783d6854f10fff20114cdf Mon Sep 17 00:00:00 2001 From: Matthieu Werner Date: Mon, 2 Oct 2023 15:59:35 +0200 Subject: [PATCH 2/2] Edit changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a2e1f3..c9deed4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## 4.0.0 (not released yet) +* Upgrade Traefik from v2.7 to v3.0 * Migrate from Invoke to Castor * Add a dockerfile linter * Do not store certificates in the router image