Skip to content

Commit 6234a73

Browse files
committed
Deploy CI CD on Test Server
1 parent 945ee2a commit 6234a73

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ WORKDIR /code
1010
COPY ./Frontend/ecommerce_inventory/ /code/Frontend/ecommerce_inventory/
1111

1212
# # Install frontend dependencies
13-
# RUN npm install
13+
RUN npm install
1414

1515
# # Copy frontend source code
1616
# COPY ./Frontend/ecommerce_inventory ./
1717

1818
# # Build frontend (adjust this based on your React build process)
19-
# RUN npm run build
19+
RUN npm run build
2020

2121
# Stage 2: Build Django backend
2222
FROM python:3.11.0
@@ -32,11 +32,12 @@ WORKDIR /code
3232
# COPY ./Backend/EcommerceInventory/requirements.txt /code/
3333

3434
# Copy built frontend to Django static files directory
35-
# COPY --from=build-stage /app/frontend/build /code/static/
3635

3736
# Copy Django project files
3837
COPY ./Backend/EcommerceInventory /code/Backend/EcommerceInventory/
38+
3939
RUN pip install -r ./Backend/EcommerceInventory/requirements.txt
40+
COPY --from=build-stage ./code/Frontend/ecommerce_inventory/build ./Backend/EcommerceInventory/static/
4041

4142
# Collect static files
4243
RUN python ./Backend/EcommerceInventory/manage.py migrate

0 commit comments

Comments
 (0)