diff --git a/Dockerfile b/Dockerfile index 8a91edc..509197a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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.