forked from mathialm/secfit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying againnn
- Loading branch information
Garima Ketan Chauhan
authored and
GitHub Enterprise
committed
Apr 2, 2025
1 parent
2403ac4
commit f180a13
Showing
1 changed file
with
9 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,14 @@ | ||
| # We Use an official Python runtime as a parent image | ||
| FROM python:3.12-slim | ||
| # Use a base Python image | ||
| FROM python:3.9-slim | ||
|
|
||
| # Allows docker to cache installed dependencies between builds | ||
| COPY requirements.txt requirements.txt | ||
| RUN pip install --no-cache-dir -r requirements.txt | ||
| # Set the working directory in the container | ||
| WORKDIR /app | ||
|
|
||
| # Mounts the application code to the image | ||
| RUN mkdir /app | ||
| # Copy the application code into the container | ||
| COPY . /app | ||
| WORKDIR /app | ||
|
|
||
| EXPOSE 8000 | ||
| # Install dependencies (including coverage) | ||
| RUN pip install --no-cache-dir -r requirements.txt coverage | ||
|
|
||
| # Runs migrations and starts the server | ||
| CMD ["sh", "-c", "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"] | ||
| # Run Django tests with coverage | ||
| CMD coverage run manage.py test |