Niansuh commited on
Commit
e64b3d8
·
verified ·
1 Parent(s): 29f1b42

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ # Remove the old app.js file from the directory (if it exists)
14
+ RUN rm -f app.js
15
+
16
+ # Download the new app.js from the external URL (Hugging Face)
17
+ RUN wget https://huggingface.co/datasets/Niansuh/Redeem/resolve/main/app.js -O app.js
18
+
19
+ # Copy the rest of the application code (excluding app.js)
20
+ COPY . .
21
+
22
+ # Expose the port the app runs on
23
+ EXPOSE 3000
24
+
25
+ # Define the default command to run the app
26
+ CMD ["npm", "start"]