oimerts commited on
Commit
534d83a
·
verified ·
1 Parent(s): 0386faa

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:20-slim
2
+
3
+ WORKDIR /code
4
+
5
+ # Copy package files
6
+ COPY package*.json ./
7
+
8
+ # Install dependencies (adding dotenv)
9
+ RUN npm install express node-fetch cors dotenv
10
+
11
+ # Bundle app source
12
+ COPY . .
13
+
14
+ # Default environment variables if not provided at runtime
15
+ ENV PORT=7860
16
+ ENV NODE_ENV=production
17
+
18
+ # Start the application
19
+ CMD ["node", "index.js"]