danielle2035 commited on
Commit
f7853ca
·
1 Parent(s): 4b2e400
Files changed (1) hide show
  1. Dockerfile +25 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # install system deps
6
+ RUN apt-get update && apt-get install -y nodejs npm
7
+
8
+ # backend deps
9
+ COPY backend/requirements.txt .
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ # copy all project
13
+ COPY . .
14
+
15
+ # build frontend
16
+ WORKDIR /app/frontend
17
+ RUN npm install
18
+ RUN npm run build
19
+
20
+ # back to backend
21
+ WORKDIR /app
22
+
23
+ EXPOSE 7860
24
+
25
+ CMD ["python", "backend/api/manage.py", "runserver", "0.0.0.0:7860"]