From 8114c01305a30e5847d502a621411923e5ead237 Mon Sep 17 00:00:00 2001 From: Garima Ketan Chauhan Date: Wed, 2 Apr 2025 12:05:41 +0200 Subject: [PATCH] Update Dockerfile trying some jugaad --- backend/Dockerfile | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 58b9f17..6a40cc3 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,15 +1,12 @@ -# We Use an official Python runtime as a parent image FROM python:3.12-slim -# Allows docker to cache installed dependencies between builds COPY requirements.txt requirements.txt RUN pip install --no-cache-dir -r requirements.txt -# Mounts the application code to the image -COPY . app -WORKDIR /app +RUN pip install coverage -EXPOSE 8000 +RUN mkdir /app +COPY . /app +WORKDIR /app -# Runs migrations and starts the production server -CMD ["sh", "-c", "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"] \ No newline at end of file +CMD ["sh", "-c", "python manage.py migrate && coverage run --source='.' manage.py test && coverage report"]