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 <manish@mgupta.me>
This commit is contained in:
AbId KhAn 2024-01-10 14:05:24 +06:00 committed by sriram veeraghanta
parent 7ff91fdb82
commit 38580c3940
3 changed files with 3 additions and 4 deletions

View File

@ -44,9 +44,6 @@ services:
env_file: env_file:
- .env - .env
environment: environment:
POSTGRES_USER: ${PGUSER}
POSTGRES_DB: ${PGDATABASE}
POSTGRES_PASSWORD: ${PGPASSWORD}
PGDATA: /var/lib/postgresql/data PGDATA: /var/lib/postgresql/data
web: web:

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
export dollar="$"
export http_upgrade="http_upgrade"
envsubst < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf envsubst < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
exec nginx -g 'daemon off;' exec nginx -g 'daemon off;'

View File

@ -19,7 +19,7 @@ http {
location / { location / {
proxy_pass http://web:3000/; proxy_pass http://web:3000/;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade ${dollar}http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";
} }