Skip to content

Commit

Permalink
💚 Feat: Deploy Build Folder
Browse files Browse the repository at this point in the history
  • Loading branch information
amirzenoozi committed Dec 22, 2023
1 parent 74eb34c commit b3a74f3
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,23 @@ FROM node:18-alpine
WORKDIR /app

# Copy the package.json file.
COPY package.json .
COPY package.json yarn.lock ./

# Install application dependencies.
RUN yarn install
RUN yarn install --production

# Copy the rest of the application files.
# Install serve node package.
RUN yarn global add serve

# Bundle app source
COPY . .

# Build the application.
RUN yarn build

# Expose the port.
EXPOSE 3000

# Run the application.
CMD ["yarn", "start"]
CMD ["serve", "-s", "build", "-l", "3000"]

0 comments on commit b3a74f3

Please sign in to comment.