File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Backend/EcommerceInventory Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Stage 1: Build frontend
2
2
FROM node:14 as build-stage
3
3
4
+ RUN ls -l /app
5
+
4
6
# Set working directory
5
7
WORKDIR /app
8
+ RUN ls -l /app
6
9
7
10
# Copy frontend package files
8
11
COPY ../../Frontend/ecommerce_inventory/package.json ../../Frontend/ecommerce_inventory/package-lock.json /app/
12
+ RUN ls -l /app
9
13
10
14
# Install frontend dependencies
11
15
RUN npm install
16
+ RUN ls -l /app
12
17
13
18
# Copy frontend source code
14
19
COPY ../../Frontend/ecommerce_inventory /app/
20
+ RUN ls -l /app
15
21
16
22
# Build frontend (adjust this based on your React build process)
17
23
RUN npm run build
24
+ RUN ls -l /app
18
25
19
26
# Stage 2: Build Django backend
20
27
FROM python:3.9
@@ -25,22 +32,27 @@ ENV PYTHONUNBUFFERED 1
25
32
26
33
# Set working directory
27
34
WORKDIR /code
35
+ RUN ls -l /app
28
36
29
37
# Install dependencies
30
38
COPY ../../Backend/EcommerceInventory/requirements.txt /code/
31
39
RUN pip install -r requirements.txt
40
+ RUN ls -l /app
32
41
33
42
# Copy built frontend to Django static files directory
34
43
COPY --from=build-stage /app/build /code/static/
44
+ RUN ls -l /app
35
45
36
46
# Copy Django project files
37
47
COPY ./EcommerceInventory /code/
48
+ RUN ls -l /app
38
49
39
50
# Collect static files
40
51
RUN python manage.py collectstatic --no-input
41
52
42
53
# Expose port 80 (adjust as necessary)
43
54
EXPOSE 80
55
+ RUN ls -l /app
44
56
45
57
# Command to run Django server
46
58
CMD ["python" , "manage.py" , "runserver" , "0.0.0.0:80" ]
You can’t perform that action at this time.
0 commit comments