Skip to content

Commit

Permalink
fix: reorder dockerfile that production is default target
Browse files Browse the repository at this point in the history
  • Loading branch information
felixerdy committed Nov 14, 2024
1 parent 6eb4dea commit 553d50c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,6 @@ WORKDIR /app
COPY package.json /app
COPY yarn.lock /app

# production stage
FROM base AS production
ENV NODE_ENV=production
RUN yarn install --pure-lockfile --production
COPY src /app/src
CMD ["yarn","start"]

# test stage
FROM base AS test
ENV NODE_ENV=test
Expand All @@ -112,3 +105,10 @@ COPY src /app/src
COPY test /app/test
COPY mocha-reporters.json /app
CMD ["yarn","test"]

# production stage
FROM base AS production
ENV NODE_ENV=production
RUN yarn install --pure-lockfile --production
COPY src /app/src
CMD ["yarn","start"]

0 comments on commit 553d50c

Please sign in to comment.