mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
build for prod
This commit is contained in:
parent
ac0e6c097b
commit
e284bf35ef
3 changed files with 16 additions and 6 deletions
|
|
@ -16,7 +16,7 @@ server {
|
|||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://web:3000;
|
||||
proxy_pass http://web:5000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection keep-alive;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ server {
|
|||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://web:3000;
|
||||
proxy_pass http://web:5000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection keep-alive;
|
||||
|
|
|
|||
|
|
@ -2,14 +2,24 @@
|
|||
# Command: docker build -f src/FilterLists.Web/Dockerfile .
|
||||
|
||||
# init base
|
||||
FROM node:alpine as final
|
||||
CMD ["npm", "start"]
|
||||
FROM node:alpine as base
|
||||
EXPOSE 3000
|
||||
WORKDIR /usr/app/
|
||||
ENTRYPOINT ["serve", "-s"]
|
||||
RUN npm install -g serve
|
||||
|
||||
# init build
|
||||
FROM node:alpine as build
|
||||
|
||||
# install
|
||||
COPY src/web/package*.json ./
|
||||
WORKDIR /usr/src/app/
|
||||
COPY src/FilterLists.Web/package*.json ./
|
||||
RUN npm install --only=prod
|
||||
|
||||
# build
|
||||
COPY src/FilterLists.Web/. ./
|
||||
RUN npm run build
|
||||
|
||||
# final
|
||||
COPY src/web/. ./
|
||||
FROM base as final
|
||||
COPY --from=build /usr/src/app/build ./
|
||||
Loading…
Reference in a new issue