Repair docker file and run in prod env
This commit is contained in:
parent
cc5d07595b
commit
c74f486b7e
1 changed files with 6 additions and 1 deletions
|
@ -2,6 +2,10 @@ FROM node:8.10.0-alpine
|
||||||
|
|
||||||
RUN mkdir -p /public
|
RUN mkdir -p /public
|
||||||
|
|
||||||
|
ENV NODE_ENV production
|
||||||
|
|
||||||
|
RUN apk add --no-cache git
|
||||||
|
|
||||||
COPY ./src /app/src
|
COPY ./src /app/src
|
||||||
COPY ./package.json /app/package.json
|
COPY ./package.json /app/package.json
|
||||||
COPY ./package-lock.json /app/package-lock.json
|
COPY ./package-lock.json /app/package-lock.json
|
||||||
|
@ -9,7 +13,8 @@ COPY ./tsconfig.json /app/tsconfig.json
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN npm install
|
RUN npm install --only=prod
|
||||||
|
RUN npm install --only=dev
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
|
Reference in a new issue