Skip to content

Commit 12f5863

Browse files
committed
Deploy CI CD on Test Server
1 parent 3c7ed0a commit 12f5863

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Backend/EcommerceInventory/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
# Stage 1: Build frontend
22
FROM node:14 as build-stage
33

4+
RUN ls -l /app
5+
46
# Set working directory
57
WORKDIR /app
8+
RUN ls -l /app
69

710
# Copy frontend package files
811
COPY ../../Frontend/ecommerce_inventory/package.json ../../Frontend/ecommerce_inventory/package-lock.json /app/
12+
RUN ls -l /app
913

1014
# Install frontend dependencies
1115
RUN npm install
16+
RUN ls -l /app
1217

1318
# Copy frontend source code
1419
COPY ../../Frontend/ecommerce_inventory /app/
20+
RUN ls -l /app
1521

1622
# Build frontend (adjust this based on your React build process)
1723
RUN npm run build
24+
RUN ls -l /app
1825

1926
# Stage 2: Build Django backend
2027
FROM python:3.9
@@ -25,22 +32,27 @@ ENV PYTHONUNBUFFERED 1
2532

2633
# Set working directory
2734
WORKDIR /code
35+
RUN ls -l /app
2836

2937
# Install dependencies
3038
COPY ../../Backend/EcommerceInventory/requirements.txt /code/
3139
RUN pip install -r requirements.txt
40+
RUN ls -l /app
3241

3342
# Copy built frontend to Django static files directory
3443
COPY --from=build-stage /app/build /code/static/
44+
RUN ls -l /app
3545

3646
# Copy Django project files
3747
COPY ./EcommerceInventory /code/
48+
RUN ls -l /app
3849

3950
# Collect static files
4051
RUN python manage.py collectstatic --no-input
4152

4253
# Expose port 80 (adjust as necessary)
4354
EXPOSE 80
55+
RUN ls -l /app
4456

4557
# Command to run Django server
4658
CMD ["python", "manage.py", "runserver", "0.0.0.0:80"]

0 commit comments

Comments
 (0)