Fix dockerfile

This commit is contained in:
Yarmo Mackenbach 2022-02-27 17:34:15 +01:00
parent 017779c7b4
commit 626faf2778
No known key found for this signature in database
GPG key ID: 37367F4AF4087AD1

View file

@ -1,12 +1,23 @@
FROM node:14-alpine FROM node:14-alpine as builder
WORKDIR /app WORKDIR /app
COPY . . COPY . .
RUN yarn --production --pure-lockfile RUN yarn --pure-lockfile
RUN yarn run build:static RUN yarn run build:static
###
FROM node:14-alpine
WORKDIR /app
COPY . .
COPY --from=builder /app/static /app/static
RUN yarn --production --pure-lockfile
EXPOSE 3000 EXPOSE 3000
CMD yarn start CMD yarn start