Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Base stage
FROM node:lts AS base
WORKDIR /usr/local/app

# Development stage
FROM base AS dev
ENV NODE_ENV=development
COPY app/package.json app/yarn.lock ./
RUN yarn install && yarn cache clean
COPY app .
COPY app ./
CMD ["yarn", "dev"]

# Production stage
FROM base AS prod
ENV NODE_ENV=production
COPY app/package.json app/yarn.lock ./
RUN yarn install --production && yarn cache clean
COPY app .
CMD ["node", "src/index.js"]
COPY app ./
CMD ["node", "src/index.js"]