File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ COPY ./Frontend/ecommerce_inventory/package.json ./Frontend/ecommerce_inventory/
11
11
RUN npm install
12
12
13
13
# Copy frontend source code
14
- COPY ./Frontend/ecommerce_inventory .
14
+ COPY ./Frontend/ecommerce_inventory ./
15
15
16
16
# Build frontend (adjust this based on your React build process)
17
17
RUN npm run build
@@ -27,16 +27,14 @@ ENV PYTHONUNBUFFERED 1
27
27
WORKDIR /code
28
28
29
29
# Copy backend requirements file
30
- COPY ./Backend/EcommerceInventory/requirements.txt .
31
-
32
- # Install backend dependencies
30
+ COPY ./Backend/EcommerceInventory/requirements.txt /code/
33
31
RUN pip install -r requirements.txt
34
32
35
33
# Copy built frontend to Django static files directory
36
- COPY --from=build-stage /app/frontend/build ./ static
34
+ COPY --from=build-stage /app/frontend/build /code/ static/
37
35
38
36
# Copy Django project files
39
- COPY ./Backend/EcommerceInventory .
37
+ COPY ./Backend/EcommerceInventory /code/
40
38
41
39
# Collect static files
42
40
RUN python manage.py collectstatic --no-input
Original file line number Diff line number Diff line change @@ -4,15 +4,10 @@ services:
4
4
web :
5
5
build :
6
6
context : .
7
- dockerfile : Dockerfile
8
- command : python manage.py runserver 0.0.0.0:80
9
- volumes :
10
- - ./Backend/EcommerceInventory:/code
11
- - ./Frontend/ecommerce_inventory/build:/code/static # Assuming React build output is in /code/static
7
+ dockerfile : Dockerfile # Adjust the path to your Dockerfile if necessary
8
+ command : gunicorn Backend.EcommerceInventory.EcommerceInventory.wsgi:application --bind 0.0.0.0:80
12
9
ports :
13
10
- " 80:80"
14
- environment :
15
- - DEBUG=0 # Set DEBUG to 0 for production-like environments
16
11
depends_on :
17
12
- db
18
13
You can’t perform that action at this time.
0 commit comments