rkihacker commited on
Commit
64e99c9
·
verified ·
1 Parent(s): 5167717

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Node.js runtime as the base image
2
+ FROM node:18-alpine
3
+
4
+ # Set the working directory inside the container
5
+ WORKDIR /usr/src/app
6
+
7
+ # Copy package.json and package-lock.json (if available)
8
+ COPY package*.json ./
9
+
10
+ # Install app dependencies
11
+ RUN npm install --production
12
+
13
+ # Copy the rest of the application code
14
+ COPY . .
15
+
16
+ # Expose the port the app runs on
17
+ EXPOSE 3000
18
+
19
+ # Define the default command to run the app
20
+ CMD ["npm", "start"]