henztech commited on
Commit
bd3f717
·
verified ·
1 Parent(s): a926618

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:18-alpine
2
+
3
+ # Install git
4
+ RUN apk add --no-cache git
5
+
6
+ # Clone repo
7
+ RUN git clone https://github.com/EMMYHENZ-TECH/grand-Bnk-2 /app
8
+
9
+ # Set working directory
10
+ WORKDIR /app
11
+
12
+ # Create data directory with correct permissions
13
+ RUN mkdir -p /app/data && \
14
+ chown -R node:node /app/data && \
15
+ chmod -R 755 /app/data
16
+
17
+ # Install dependencies
18
+ RUN npm install
19
+
20
+ # Switch to non-root user (important for security)
21
+ USER node
22
+
23
+ # Environment variables
24
+ ENV PORT=7860
25
+ ENV NODE_ENV=production
26
+
27
+ EXPOSE 7860
28
+
29
+ CMD ["node", "server.js"]