diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..5862a2f --- /dev/null +++ b/dockerfile @@ -0,0 +1,21 @@ +# Use the official Node.js image from the Docker Hub +FROM node:18-alpine + +# Set the working directory inside the container +WORKDIR /app + +# Copy the package.json and package-lock.json to install dependencies +COPY package.json . +COPY package-lock.json . + +# Install dependencies +RUN npm install + +# Copy the rest of the app files +COPY . . + +# Expose the port the app runs on +EXPOSE 3000 + +# Command to run the app +CMD ["node", "server.js"] \ No newline at end of file