archive
/
tstatic
Archived
1
Fork 0

Cleanup container and reorder

This commit is contained in:
Jake Howard 2018-05-04 20:47:51 +01:00
parent c74f486b7e
commit 0ec819e232
Signed by: jake
GPG Key ID: 57AFB45680EDD477
1 changed files with 9 additions and 8 deletions

View File

@ -1,11 +1,5 @@
FROM node:8.10.0-alpine
RUN mkdir -p /public
ENV NODE_ENV production
RUN apk add --no-cache git
COPY ./src /app/src
COPY ./package.json /app/package.json
COPY ./package-lock.json /app/package-lock.json
@ -13,11 +7,18 @@ COPY ./tsconfig.json /app/tsconfig.json
WORKDIR /app
RUN npm install --only=prod
RUN npm install --only=dev
RUN mkdir -p /public
RUN apk add --no-cache git
RUN npm install
ENV NODE_ENV production
RUN npm run build
RUN npm prune --production
CMD npm start -- /public
EXPOSE 5000