File size: 599 Bytes
37d705e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM node:18-alpine

# Install git
RUN apk add --no-cache git

# Clone repo
RUN git clone https://github.com/kingdavid103/Tracking-payment6.git /app

# Set working directory
WORKDIR /app

# Create required directories with proper permissions
RUN mkdir -p /app/data /app/public/uploads && \
    chown -R node:node /app/data /app/public/uploads && \
    chmod -R 755 /app/data /app/public/uploads

# Install dependencies
RUN npm install

# Switch to non-root user (important for security)
USER node

# Environment variables
ENV PORT=7860
ENV NODE_ENV=production

EXPOSE 7860

CMD ["node", "server.js"]