From c94a1ea9adf07c67214923ba80d6a30b1b2c509b Mon Sep 17 00:00:00 2001 From: Mike Date: Sun, 1 Jun 2025 16:41:05 +0000 Subject: [PATCH 1/3] Deployment Fixes --- Dockerfile | 1 + compose.prod.yaml | 7 +++++++ config/packages/framework.yaml | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e35e415..91cd5e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ file \ gettext \ git \ + bash \ libnss3-tools \ cron \ && rm -rf /var/lib/apt/lists/* diff --git a/compose.prod.yaml b/compose.prod.yaml index f0db05d..b6ba525 100644 --- a/compose.prod.yaml +++ b/compose.prod.yaml @@ -6,5 +6,12 @@ services: target: frankenphp_prod environment: APP_SECRET: ${APP_SECRET} + TRUSTED_PROXIES: ${TRUSTED_PROXIES:-127.0.0.0/8,10.0.0.0/8} + SERVER_NAME: :80 MERCURE_PUBLISHER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET} MERCURE_SUBSCRIBER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET} + ports: + # HTTP + - target: 80 + published: 80 + protocol: tcp diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index b40ac9a..0d3f118 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -9,7 +9,10 @@ framework: cookie_secure: auto cookie_samesite: lax cookie_lifetime: 0 # integer, lifetime in seconds, 0 means 'valid for the length of the browser session' - + trusted_proxies: '%env(TRUSTED_PROXIES)%' + trusted_headers: ['forwarded', 'x-forwarded-for', 'x-forwarded-proto'] + # trusted_proxies: '%env(TRUSTED_PROXIES)%' + #trusted_proxies: 'symfony,REMOTE_ADDR' #esi: true #fragments: true From 7db38f789d5614bfb552355570b788f3f33a472e Mon Sep 17 00:00:00 2001 From: Mike Date: Sun, 1 Jun 2025 16:49:59 +0000 Subject: [PATCH 2/3] Script to Compile Asset Map for Deployment --- asset_map_compile.sh | 1 + 1 file changed, 1 insertion(+) create mode 100644 asset_map_compile.sh diff --git a/asset_map_compile.sh b/asset_map_compile.sh new file mode 100644 index 0000000..9597078 --- /dev/null +++ b/asset_map_compile.sh @@ -0,0 +1 @@ +docker exec newsroom-php-1 php bin/console asset-map:compile From 6d929a8304a22c869eba6999dc3bb13c6ef05058 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 2 Jun 2025 18:44:46 +0000 Subject: [PATCH 3/3] loweracase atoms in tag --- templates/pages/article.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/pages/article.html.twig b/templates/pages/article.html.twig index 410e382..8131c5c 100644 --- a/templates/pages/article.html.twig +++ b/templates/pages/article.html.twig @@ -28,7 +28,7 @@