From 35ba516dd78f2933721204d1f1c30d007087ba9a Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sat, 27 Jul 2019 09:46:13 -0500 Subject: [PATCH] serve web with nginx rather than node+serve --- ops/nginx/conf.d.dev/filterlists.conf | 2 +- ops/nginx/conf.d/filterlists.conf | 2 +- src/FilterLists.Web/Dockerfile | 9 +++------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ops/nginx/conf.d.dev/filterlists.conf b/ops/nginx/conf.d.dev/filterlists.conf index 80a48ce9d..147533120 100644 --- a/ops/nginx/conf.d.dev/filterlists.conf +++ b/ops/nginx/conf.d.dev/filterlists.conf @@ -16,7 +16,7 @@ server { } location / { - proxy_pass http://web:5000; + proxy_pass http://web:80; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; diff --git a/ops/nginx/conf.d/filterlists.conf b/ops/nginx/conf.d/filterlists.conf index a5aae5cee..16ac965df 100644 --- a/ops/nginx/conf.d/filterlists.conf +++ b/ops/nginx/conf.d/filterlists.conf @@ -20,7 +20,7 @@ server { } location / { - proxy_pass http://web:5000; + proxy_pass http://web:80; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; diff --git a/src/FilterLists.Web/Dockerfile b/src/FilterLists.Web/Dockerfile index cfb0962cd..75bc24d4c 100644 --- a/src/FilterLists.Web/Dockerfile +++ b/src/FilterLists.Web/Dockerfile @@ -2,11 +2,8 @@ # Command: docker build -f src/FilterLists.Web/Dockerfile . # init base -FROM node:alpine as base -EXPOSE 3000 -WORKDIR /usr/app/ -ENTRYPOINT ["serve", "-s"] -RUN npm install -g serve +FROM nginx:alpine as base +CMD ["nginx", "-g", "daemon off;"] # init build FROM node:alpine as build @@ -22,4 +19,4 @@ RUN npm run build # final FROM base as final -COPY --from=build /usr/src/app/build ./ \ No newline at end of file +COPY --from=build /usr/src/app/build /usr/share/nginx/html \ No newline at end of file