HenzHosting commited on
Commit
18e7573
·
verified ·
1 Parent(s): 6df21f8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -9
Dockerfile CHANGED
@@ -1,15 +1,24 @@
1
- # Stage 1 - Build
2
- FROM node:18-bullseye as builder
3
 
4
- RUN apt-get update && apt-get install -y git
5
  WORKDIR /app
6
- RUN git clone https://github.com/BNNUSA/Coinbase-Clone.git .
 
 
 
 
 
 
 
 
7
  RUN npm install --production
8
 
9
- # Stage 2 - Runtime
10
- FROM node:18-bullseye-slim
11
 
12
- WORKDIR /app
13
- COPY --from=builder /app .
14
  EXPOSE 7860
15
- CMD ["node", "server.js"]
 
 
 
1
+ # Use lightweight Alpine base
2
+ FROM node:18-alpine
3
 
4
+ # Set working directory
5
  WORKDIR /app
6
+
7
+ # Install system dependencies
8
+ RUN apk add --no-cache git
9
+
10
+ # Clone repository (including your code)
11
+ RUN git clone https://github.com/yummi184/Coinbase-Clone.git .
12
+
13
+ # Install app dependencies
14
+ COPY package*.json ./
15
  RUN npm install --production
16
 
17
+ # Create data directory for JSON storage
18
+ RUN mkdir -p /app/data
19
 
20
+ # Expose Hugging Face's default port
 
21
  EXPOSE 7860
22
+
23
+ # Start the application
24
+ CMD ["node", "server.js"]