rajkhanke commited on
Commit
c948ee8
·
verified ·
1 Parent(s): a35962c

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base image
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory
5
+ WORKDIR /app
6
+
7
+ # Copy application files
8
+ COPY . /app
9
+
10
+ # Ensure the uploads folder exists and is writable
11
+ RUN mkdir -p static/uploads && chmod -R 777 static/uploads
12
+
13
+ # Install dependencies
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Expose the port your app runs on
17
+ EXPOSE 7860
18
+
19
+ # Command to run the application
20
+ CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"]
21
+