From 3b4bfe22809b40e3807fb6fdea7bc55ff820072b Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Tue, 7 Aug 2018 18:12:37 -0700 Subject: [PATCH] Minor fix to nginx dockerfile --- net/grpc/gateway/docker/nginx/Dockerfile | 3 +++ net/grpc/gateway/examples/echo/nginx.conf | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/net/grpc/gateway/docker/nginx/Dockerfile b/net/grpc/gateway/docker/nginx/Dockerfile index be8e6da..ca4518f 100644 --- a/net/grpc/gateway/docker/nginx/Dockerfile +++ b/net/grpc/gateway/docker/nginx/Dockerfile @@ -14,6 +14,9 @@ FROM grpc-web:prereqs +RUN cd /github/grpc-web/net/grpc/gateway/examples/echo && \ + sed -i 's/localhost:9090/echo-server:9090/g' nginx.conf + RUN cd /github/grpc-web && \ make standalone-proxy diff --git a/net/grpc/gateway/examples/echo/nginx.conf b/net/grpc/gateway/examples/echo/nginx.conf index a1ab72a..9499aac 100644 --- a/net/grpc/gateway/examples/echo/nginx.conf +++ b/net/grpc/gateway/examples/echo/nginx.conf @@ -21,7 +21,7 @@ http { root /var/www/html; } location / { - grpc_pass echo-server:9090; + grpc_pass localhost:9090; if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';