Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
trying some jugaad
  • Loading branch information
Garima Ketan Chauhan authored and GitHub Enterprise committed Apr 2, 2025
1 parent ff73376 commit 8114c01
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
CMD ["sh", "-c", "python manage.py migrate && coverage run --source='.' manage.py test && coverage report"]

0 comments on commit 8114c01

Please sign in to comment.