Skip to content

Commit

Permalink
previous version for docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-apprentice committed Aug 27, 2022
1 parent f6fea4c commit 1fde383
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 29 deletions.
42 changes: 13 additions & 29 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,20 @@
## build runner
FROM node:lts-alpine as build-runner
## We install nodejs in order to run the application
FROM node:lts-alpine

# Set temp directory
WORKDIR /tmp/app
## Create the folder for the application
WORKDIR /app

# Move package.json
COPY package.json .
## Copy the package.json in order to install the necessary dependencies
COPY ./package.json .

# Install dependencies
## We install the dependencies
RUN npm install

# Move source files
COPY src ./src
COPY tsconfig.json .

# Build project
RUN npm run build

# Production runner
FROM node:lts-alpine as prod-runner

# Set work directory
WORKDIR /app

# Copy package.json from build-runner
COPY --from=build-runner /tmp/app/package.json /app/package.json

# Install dependencies
RUN npm install --only=production
## Copy everything to the application
COPY . /app

# Move build files
COPY --from=build-runner /tmp/app/build /app/build
## Expose the port
EXPOSE 3000

# Start bot
CMD [ "node", "build/index.js" ]
## Run the application
CMD npm run start
1 change: 1 addition & 0 deletions src/components/common/item/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line
import * as React from 'react';
import Paper from '@mui/material/Paper';
import { styled } from '@mui/material/styles';
Expand Down

1 comment on commit 1fde383

@vercel
Copy link

@vercel vercel bot commented on 1fde383 Aug 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.