From ef83b6373849ade5d8f6d79468d9eb5f677f5097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=BCckel?= Date: Fri, 10 Jan 2025 12:20:48 +0100 Subject: [PATCH] feat: use upstream to be able to bypass the need of a env variable in the includes file Related: SHOPWARE-124 --- nginx/etc/nginx/includes/shopware6 | 3 +-- nginx/examples/shopware6.conf.template | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nginx/etc/nginx/includes/shopware6 b/nginx/etc/nginx/includes/shopware6 index 171f31f..4348581 100644 --- a/nginx/etc/nginx/includes/shopware6 +++ b/nginx/etc/nginx/includes/shopware6 @@ -1,6 +1,5 @@ include includes/defaults; - root /var/www/public; location ~ ^/(theme|media|thumbnail|bundles|css|fonts|js|recovery|sitemap)/ { @@ -61,5 +60,5 @@ location ~ \.php$ { proxy_read_timeout 300s; send_timeout 300s; client_body_buffer_size 128k; - fastcgi_pass ${FPM_BACKEND}; + fastcgi_pass shop_backend; } diff --git a/nginx/examples/shopware6.conf.template b/nginx/examples/shopware6.conf.template index c62a644..b0b89bb 100644 --- a/nginx/examples/shopware6.conf.template +++ b/nginx/examples/shopware6.conf.template @@ -1,3 +1,7 @@ +upstream shop_backend { + server ${FPM_BACKEND}; +} + server { listen 80;