mirror of https://github.com/kern/filepizza
Merge cdddf542c9 into e4fb3431fb
commit
1dd4fe9cae
@ -1,9 +1,24 @@
|
|||||||
FROM node:alpine
|
FROM node:alpine as builder
|
||||||
MAINTAINER Alexander Kern <filepizza@kern.io>
|
LABEL maintainer="Alexander Kern <filepizza@kern.io>"
|
||||||
|
|
||||||
|
WORKDIR /root/filepizza
|
||||||
|
|
||||||
COPY . ./
|
COPY . ./
|
||||||
|
|
||||||
|
# copy production node_modules aside
|
||||||
|
RUN npm ci --only=production
|
||||||
|
RUN cp -R node_modules prod_node_modules
|
||||||
|
|
||||||
RUN npm install && npm run build
|
RUN npm install && npm run build
|
||||||
|
|
||||||
|
FROM node:alpine
|
||||||
|
LABEL maintainer="Alexander Kern <filepizza@kern.io>"
|
||||||
|
WORKDIR /root/filepizza
|
||||||
|
|
||||||
|
# copy production files
|
||||||
|
COPY --from=builder /root/filepizza/prod_node_modules ./node_modules
|
||||||
|
COPY --from=builder /root/filepizza/dist ./dist
|
||||||
|
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD node ./dist/index.js
|
ENTRYPOINT node ./dist/index.js
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue