-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
# Use the official Node.js image from Docker Hub. | ||
FROM node:18 | ||
# Use the official Node.js image. | ||
FROM node:23 | ||
|
||
# Set the working directory inside the container. | ||
WORKDIR /usr/src/app | ||
|
||
# Copy package.json and package-lock.json to the container. | ||
# Copy package.json and package-lock.json (if available). | ||
COPY package*.json ./ | ||
|
||
# Install application dependencies. | ||
# Install dependencies. | ||
RUN npm install | ||
|
||
# Copy the rest of your application code to the container. | ||
# Copy the rest of the application code. | ||
COPY . . | ||
|
||
# Expose the port that your application will run on. | ||
# Build the application (if necessary). | ||
RUN npm run start:prod | ||
|
||
# Expose the port that your app runs on. | ||
EXPOSE 8080 | ||
|
||
# Command to run your application. | ||
CMD [ "npm", "start" ] | ||
# Command to run the application. | ||
CMD ["node", "dist/index.js"] # Adjust the command based on your app entry point. |