Skip to content

Commit

Permalink
Installing the prod and test dependencies separately for modularity
Browse files Browse the repository at this point in the history
  • Loading branch information
moonraker595 committed Nov 14, 2024
1 parent 30163a4 commit 999dcd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ CMD ["fastapi", "run", "/app/api/main.py", "--host", "0.0.0.0", "--port", "8000"
# Testing Stage
FROM base AS test

# Copy the requirements file for test dependencies
COPY requirements-test.txt /app/
# Copy the requirements file for the app & the test dependencies
COPY requirements.txt requirements-test.txt /app/

# Install both production and test dependencies
RUN pip install --no-cache-dir -r requirements-test.txt
RUN pip install --no-cache-dir -r requirements.txt -r requirements-test.txt

# Copy everything in
COPY . /app
Expand Down
11 changes: 1 addition & 10 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# Production dependencies
pydantic==2.9.2
pydantic-settings==2.6.1
fastapi[all]==0.115.5
prometheus_client==0.21.0
requests==2.32.3
PyJWT==2.9.0
cryptography==43.0.3
opensearch-py==2.7.1

# Testing dependencies
pytest==8.3.3
pytest-env==1.1.5

0 comments on commit 999dcd8

Please sign in to comment.