Skip to content

Commit fff6ee6

Browse files
abidkhan484mguptahub
authored andcommitted
Fix env substitute issue in websocket docker setup (#3296)
* 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]>
1 parent 3809570 commit fff6ee6

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

docker-compose-local.yml

-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ services:
4444
env_file:
4545
- .env
4646
environment:
47-
POSTGRES_USER: ${PGUSER}
48-
POSTGRES_DB: ${PGDATABASE}
49-
POSTGRES_PASSWORD: ${PGPASSWORD}
5047
PGDATA: /var/lib/postgresql/data
5148

5249
web:

nginx/env.sh

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/bin/sh
22

3+
export dollar="$"
4+
export http_upgrade="http_upgrade"
35
envsubst < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
46
exec nginx -g 'daemon off;'

nginx/nginx.conf.dev

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ http {
1919
location / {
2020
proxy_pass http://web:3000/;
2121
proxy_http_version 1.1;
22-
proxy_set_header Upgrade $http_upgrade;
22+
proxy_set_header Upgrade ${dollar}http_upgrade;
2323
proxy_set_header Connection "upgrade";
2424
}
2525

0 commit comments

Comments
 (0)