Azeez98 commited on
Commit
72f6109
·
verified ·
1 Parent(s): c8a3f35

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base image
2
+ FROM python:3.9
3
+
4
+ # Create non-root user
5
+ RUN useradd -m -u 1000 user
6
+ USER user
7
+ ENV PATH="/home/user/.local/bin:$PATH"
8
+
9
+ # Set working directory
10
+ WORKDIR /app
11
+
12
+ # Clone GitHub repo into /app
13
+ # Replace with your repo URL
14
+ RUN git clone https://github.com/Mekhlafi98/solverai.git -b develop2 /app
15
+
16
+ # Install Python dependencies
17
+ COPY --chown=user ./requirements.txt requirements.txt
18
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
19
+
20
+ # Collect static files
21
+ RUN python manage.py collectstatic --noinput
22
+
23
+ # Expose Django port
24
+ EXPOSE 7860
25
+
26
+ # Run with Gunicorn (edit project name below)
27
+ CMD ["gunicorn", "solverai.wsgi:application", "--bind", "0.0.0.0:7860"]