From 5c468cca13ecae6f85c578f2821f1f8a05adc4f5 Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Mon, 11 Sep 2023 10:38:17 +0200 Subject: [PATCH] fix: remove Souin cache (waiting for fix) --- api/Dockerfile | 4 ++-- api/config/packages/api_platform.yaml | 17 ----------------- api/docker/caddy/Caddyfile | 2 -- docker-compose.prod.yml | 8 -------- helm/api-platform/templates/deployment.yaml | 7 ------- 5 files changed, 2 insertions(+), 36 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index b526f1c01..f4309d2ae 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -118,8 +118,8 @@ ARG TARGETARCH WORKDIR /srv/app -# Download Caddy compiled with the Mercure, Vulcain and Souin modules -ADD --chmod=500 https://caddyserver.com/api/download?os=linux&arch=$TARGETARCH&p=github.com/dunglas/mercure/caddy&p=github.com/dunglas/vulcain/caddy&p=github.com/caddyserver/cache-handler /usr/bin/caddy +# Download Caddy compiled with the Mercure and Vulcain +ADD --chmod=500 https://caddyserver.com/api/download?os=linux&arch=$TARGETARCH&p=github.com/dunglas/mercure/caddy&p=github.com/dunglas/vulcain/caddy /usr/bin/caddy COPY --link docker/caddy/Caddyfile /etc/caddy/Caddyfile diff --git a/api/config/packages/api_platform.yaml b/api/config/packages/api_platform.yaml index 7a9964e6b..657c61049 100644 --- a/api/config/packages/api_platform.yaml +++ b/api/config/packages/api_platform.yaml @@ -30,23 +30,6 @@ api_platform: scopes: openid: (required) Indicates that the application intends to use OIDC to verify the user's identity -#when@prod: -# parameters: -# # The api url that is called to invalidate cached resources -# # Can't be set in .env file because it's only available on prod env -# env(SOUIN_API_URL): http://caddy/souin-api -# -# api_platform: -# http_cache: -# invalidation: -# enabled: true -# purger: 'api_platform.http_cache.purger.souin' -# urls: ['%env(SOUIN_API_URL)%'] -# defaults: -# cache_headers: -# max_age: 0 -# shared_max_age: 3600 - services: _defaults: autowire: false diff --git a/api/docker/caddy/Caddyfile b/api/docker/caddy/Caddyfile index 6b95ed9f1..995d82518 100644 --- a/api/docker/caddy/Caddyfile +++ b/api/docker/caddy/Caddyfile @@ -6,8 +6,6 @@ log -{$CADDY_CACHE} - # Matches requests for OIDC routes @oidc expression path('/oidc/*') diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 42096300d..dd45001e8 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -27,14 +27,6 @@ services: environment: MERCURE_PUBLISHER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET} MERCURE_SUBSCRIBER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET} -# CADDY_GLOBAL_OPTIONS: | -# order cache before rewrite -# cache { -# api { -# souin -# } -# } -# CADDY_CACHE: cache database: environment: diff --git a/helm/api-platform/templates/deployment.yaml b/helm/api-platform/templates/deployment.yaml index db4bb6809..8d286086c 100644 --- a/helm/api-platform/templates/deployment.yaml +++ b/helm/api-platform/templates/deployment.yaml @@ -40,13 +40,6 @@ spec: value: {{ include "api-platform.fullname" . }}-pwa:3000 - name: OIDC_UPSTREAM value: {{ .Release.Name }}-keycloak:80 - - name: CADDY_CACHE - value: cache - - name: CADDY_GLOBAL_OPTIONS - valueFrom: - configMapKeyRef: - name: {{ include "api-platform.fullname" . }} - key: caddy-global-options - name: MERCURE_EXTRA_DIRECTIVES valueFrom: configMapKeyRef: