Okay now it's ready
This commit is contained in:
parent
aadbac7229
commit
13c18cb1ad
1 changed files with 19 additions and 3 deletions
22
Dockerfile
22
Dockerfile
|
@ -2,18 +2,34 @@ FROM node:lts-alpine AS base
|
|||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
FROM base AS install
|
||||
|
||||
RUN mkdir dev
|
||||
COPY package.json dev/
|
||||
COPY yarn.lock dev/
|
||||
RUN cd /usr/src/app/dev && yarn install
|
||||
|
||||
# Not needed as of now since adapter-node
|
||||
# packs all of our dependencies for us.
|
||||
|
||||
# RUN mkdir prod
|
||||
# COPY package.json prod/
|
||||
# COPY yarn.lock prod/
|
||||
# RUN cd /usr/src/app/prod && yarn install --production
|
||||
|
||||
FROM base AS build
|
||||
|
||||
COPY --from=install /usr/src/app/dev/node_modules node_modules
|
||||
COPY . .
|
||||
|
||||
RUN yarn install
|
||||
RUN yarn build
|
||||
|
||||
FROM base AS app
|
||||
|
||||
# COPY --from=install /usr/src/app/prod/node_modules node_modules
|
||||
COPY --from=build /usr/src/app/package.json .
|
||||
COPY --from=build /usr/src/app/build/* ./
|
||||
COPY --from=build /usr/src/app/build/ .
|
||||
|
||||
EXPOSE 3000/tcp
|
||||
ENTRYPOINT [ "node", "index.js" ]
|
||||
CMD [ "node", "index.js" ]
|
||||
|
||||
|
|
Loading…
Reference in a new issue