From 38580c394081a5426e8bc62f1a1730d32c064ee1 Mon Sep 17 00:00:00 2001 From: AbId KhAn Date: Wed, 10 Jan 2024 14:05:24 +0600 Subject: [PATCH] Fix env substitute issue in websocket docker setup (#3296) * fix websocket connection issue in docker makeplane/plane#3195 * fix websocket connection issue for local env with removing from the prod nginx conf template makeplane/plane#319 * fix env substitution issue of proxy_set_header makeplane/plane#3196 * review fixes --------- Co-authored-by: Manish Gupta --- docker-compose-local.yml | 3 --- nginx/env.sh | 2 ++ nginx/nginx.conf.dev | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docker-compose-local.yml b/docker-compose-local.yml index 4e1e3b39f..b0fb9da24 100644 --- a/docker-compose-local.yml +++ b/docker-compose-local.yml @@ -44,9 +44,6 @@ services: env_file: - .env environment: - POSTGRES_USER: ${PGUSER} - POSTGRES_DB: ${PGDATABASE} - POSTGRES_PASSWORD: ${PGPASSWORD} PGDATA: /var/lib/postgresql/data web: diff --git a/nginx/env.sh b/nginx/env.sh index 59e4a46a0..7db471eca 100644 --- a/nginx/env.sh +++ b/nginx/env.sh @@ -1,4 +1,6 @@ #!/bin/sh +export dollar="$" +export http_upgrade="http_upgrade" envsubst < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf exec nginx -g 'daemon off;' diff --git a/nginx/nginx.conf.dev b/nginx/nginx.conf.dev index 182fc4d83..f86c84aa8 100644 --- a/nginx/nginx.conf.dev +++ b/nginx/nginx.conf.dev @@ -19,7 +19,7 @@ http { location / { proxy_pass http://web:3000/; proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; + proxy_set_header Upgrade ${dollar}http_upgrade; proxy_set_header Connection "upgrade"; }