sikeaditya commited on
Commit
6159b71
·
verified ·
1 Parent(s): ab59b31

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -3
Dockerfile CHANGED
@@ -4,9 +4,17 @@ WORKDIR /app
4
 
5
  COPY . .
6
 
7
- # Create uploads directory with proper permissions
8
- RUN mkdir -p static/uploads && chmod 777 static/uploads
9
-
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
 
 
 
 
 
 
 
 
 
 
12
  CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
 
4
 
5
  COPY . .
6
 
7
+ # Install dependencies
 
 
8
  RUN pip install --no-cache-dir -r requirements.txt
9
 
10
+ # Create uploads directory and feedback.json with proper permissions
11
+ RUN mkdir -p static/uploads && \
12
+ touch feedback.json && \
13
+ chmod 777 static/uploads && \
14
+ chmod 666 feedback.json
15
+
16
+ # Run as non-root user for security
17
+ RUN adduser --disabled-password --gecos '' appuser
18
+ USER appuser
19
+
20
  CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]