serve web with nginx rather than node+serve

This commit is contained in:
Collin M. Barrett 2019-07-27 09:46:13 -05:00
parent e284bf35ef
commit 35ba516dd7
3 changed files with 5 additions and 8 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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 ./
COPY --from=build /usr/src/app/build /usr/share/nginx/html