Skip to content

Commit

Permalink
Fix env substitute issue in websocket docker setup (#3296)
Browse files Browse the repository at this point in the history
* fix websocket connection issue in docker #3195

* fix websocket connection issue for local env with removing from the prod nginx conf template #319

* fix env substitution issue  of proxy_set_header #3196

* review fixes

---------

Co-authored-by: Manish Gupta <[email protected]>
  • Loading branch information
2 people authored and sriramveeraghanta committed Jan 22, 2024
1 parent 7ff91fd commit 38580c3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 0 additions & 3 deletions docker-compose-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ services:
env_file:
- .env
environment:
POSTGRES_USER: ${PGUSER}
POSTGRES_DB: ${PGDATABASE}
POSTGRES_PASSWORD: ${PGPASSWORD}
PGDATA: /var/lib/postgresql/data

web:
Expand Down
2 changes: 2 additions & 0 deletions nginx/env.sh
Original file line number Diff line number Diff line change
@@ -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;'
2 changes: 1 addition & 1 deletion nginx/nginx.conf.dev
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

Expand Down

0 comments on commit 38580c3

Please sign in to comment.