Service-Xi commited on
Commit
18d17a0
·
verified ·
1 Parent(s): 804afc9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -6
Dockerfile CHANGED
@@ -9,15 +9,17 @@ RUN git clone https://github.com/Kingdavid102/fedex.git /app
9
  # Set working directory
10
  WORKDIR /app
11
 
12
- # Create required directories with proper permissions
13
- RUN mkdir -p /app/data /app/public/uploads && \
14
- chown -R node:node /app/data /app/public/uploads && \
15
- chmod -R 755 /app/data /app/public/uploads
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
 
9
  # Set working directory
10
  WORKDIR /app
11
 
 
 
 
 
 
12
  # Install dependencies
13
  RUN npm install
14
 
15
+ # Create /uploads and add products.json with correct ownership
16
+ RUN mkdir -p /uploads && \
17
+ touch /products.json && \
18
+ chown -R node:node /uploads /products.json && \
19
+ chmod -R 755 /uploads && \
20
+ chmod 644 /products.json
21
+
22
+ # Switch to non-root user
23
  USER node
24
 
25
  # Environment variables