Skip to content

Commit

Permalink
CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
astorfi committed Nov 23, 2024
1 parent 5707d85 commit 2a21e98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r dev-requirements.txt # Install development requirements for testing and linting
- name: Lint Code
run: pylint app/**/*.py
Expand All @@ -35,6 +36,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
file: deployment/Dockerfile
tags: user/repository:latest
push: true

Expand Down
5 changes: 4 additions & 1 deletion deployment/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ FROM python:3.8-slim

WORKDIR /app

# Copy only production requirements
COPY requirements.txt .
RUN pip install -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Copy the entire application code to the working directory
COPY . .

# Run the FastAPI app using Uvicorn
CMD ["uvicorn", "src.deployment.fastapi_app:app", "--host", "0.0.0.0", "--port", "8000"]

0 comments on commit 2a21e98

Please sign in to comment.