diff --git a/compose.yml b/compose.yml index 98a50d73a..5386b2f2d 100644 --- a/compose.yml +++ b/compose.yml @@ -37,6 +37,7 @@ services: - API_UPSTREAM=${API_UPSTREAM:-php:9000} - PWA_SERVER_NAME=${PWA_SERVER_NAME:-gally.localhost} - PWA_UPSTREAM=${PWA_UPSTREAM:-pwa:3000} + - EXAMPLE_UPSTREAM=${PWA_UPSTREAM:-pwa:3000} php: build: diff --git a/docker/router/templates/default.conf.template b/docker/router/templates/default.conf.template index fe0005f67..73f4c37d3 100644 --- a/docker/router/templates/default.conf.template +++ b/docker/router/templates/default.conf.template @@ -2,12 +2,6 @@ upstream fastcgi_backend { server "$API_UPSTREAM"; } -# Test if example app upstream is defined -map $EXAMPLE_UPSTREAM $example_upstream { - default $EXAMPLE_UPSTREAM; - "" "not_defined"; -} - server { server_name $PWA_SERVER_NAME; root /app/public; @@ -18,11 +12,7 @@ server { } location ~ ^/(example|ws) { - if ($example_upstream = "not_defined") { - return 404; - } - - proxy_pass http://$example_upstream; + proxy_pass http://$EXAMPLE_UPSTREAM; } # WebSocket support