Skip to content

docs: add comments in dockerfile #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
14 changes: 14 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
# Use the official Node.js 21 image from Docker Hub as the base image
FROM node:21

# Set the working directory in the Docker container to /app
WORKDIR /app

# Copy package.json and package-lock.json (if available) to the working directory
COPY package*.json ./

# Install the dependencies defined in package.json
RUN npm install

# Copy the rest of the application code to the working directory
COPY . .

# Expose port 4000 in the Docker container. This is the port that the application will use.
EXPOSE 4000

# Define the command that should be executed when the Docker container starts.
# In this case, "npm run start" will be executed.
CMD ["npm", "run", "start"]