Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api dev #10

Merged
merged 25 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
51e8b3e
Update api_cd.yml
marcellinus-witarsah Aug 7, 2024
ab600ee
remove copying environment files into docker images
marcellinus-witarsah Aug 7, 2024
f4a8a2e
Merge branch 'api-dev' of github.com:marcellinus-witarsah/credit-scor…
marcellinus-witarsah Aug 7, 2024
6b2ae9f
Update api_cd.yml
marcellinus-witarsah Aug 7, 2024
d43e29a
remove copying .env file
marcellinus-witarsah Aug 7, 2024
af1194c
Create an auto-deploy file
marcellinus-witarsah Aug 8, 2024
e0cd69a
Delete .github/workflows/creditscoreservice-AutoDeployTrigger-193a6ae…
marcellinus-witarsah Aug 9, 2024
32a863e
delete the api-cd.yaml
marcellinus-witarsah Aug 9, 2024
dc3796d
Create an auto-deploy file
marcellinus-witarsah Aug 9, 2024
9605ba7
Delete .github/workflows/creditscoreservice-AutoDeployTrigger-29af8a3…
marcellinus-witarsah Aug 9, 2024
f540037
Create an auto-deploy file
marcellinus-witarsah Aug 9, 2024
f682b88
Update the auto-deploy file
marcellinus-witarsah Aug 9, 2024
478a904
Update the auto-deploy file
marcellinus-witarsah Aug 9, 2024
f1842a2
Delete .github/workflows/creditscoreservice-AutoDeployTrigger-29af8a3…
marcellinus-witarsah Aug 9, 2024
a596466
Create an auto-deploy file
marcellinus-witarsah Aug 9, 2024
b6a8983
remove relativ path
marcellinus-witarsah Aug 9, 2024
f807933
debug docker
marcellinus-witarsah Aug 9, 2024
3ccf88a
Delete .github/workflows/creditscoreservice-AutoDeployTrigger-29af8a3…
marcellinus-witarsah Aug 9, 2024
1e727b7
Create an auto-deploy file
marcellinus-witarsah Aug 9, 2024
a1d5436
Delete .github/workflows/creditscoreservice-AutoDeployTrigger-29af8a3…
marcellinus-witarsah Aug 9, 2024
dc8f78c
Create an auto-deploy file
marcellinus-witarsah Aug 9, 2024
482261b
use the global requirements.txt file
marcellinus-witarsah Aug 9, 2024
5b7cc24
Merge branch 'api-dev' of github.com:marcellinus-witarsah/credit-scor…
marcellinus-witarsah Aug 9, 2024
e7e16eb
change filename to api_cd.yaml
marcellinus-witarsah Aug 10, 2024
ced8622
remove spaces
marcellinus-witarsah Aug 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions .github/workflows/api_cd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Continuous deployment for creditscoreservice API
name: Trigger auto deployment for creditscoreservice

# When this action will be executed
on:
Expand All @@ -7,8 +7,8 @@ on:
branches:
[ api-dev ]
paths:
- 'api/**'
- '.github/workflows/creditscoreservice-AutoDeployTrigger-a77c8c46-92c2-4a2a-bce2-4097e4f37b79.yml'
- '**'
- '.github/workflows/creditscoreservice-AutoDeployTrigger-74035dcf-6d6c-4ab8-8a24-b589df61fd6d.yml'

# Allow manual trigger
workflow_dispatch:
Expand All @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout to the branch
uses: actions/checkout@v4
uses: actions/checkout@v2

- name: Azure Login
uses: azure/login@v1
Expand All @@ -29,15 +29,10 @@ jobs:
- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}/api
appSourcePath: ${{ github.workspace }}
registryUrl: creditscorecr.azurecr.io
registryUsername: ${{ secrets.CREDITSCORESERVICE_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.CREDITSCORESERVICE_REGISTRY_PASSWORD }}
containerAppName: creditscoreservice
resourceGroup: personalprojects
imageToBuild: creditscorecr.azurecr.io/creditscoreservice:${{ github.sha }}





imageToBuild: creditscorecr.azurecr.io/creditscoreservice:${{ github.sha }}
21 changes: 10 additions & 11 deletions api/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ RUN apt-get update && apt-get -y install sudo
WORKDIR /app

# Set working from directory
COPY ./api/api.py /app/api.py
COPY ./api/requirements.txt /app/requirements.txt
COPY ./credit_score_mlops /app/credit_score_mlops
COPY ./params.yaml /app/params.yaml
COPY ./api.yaml /app/api.yaml
COPY ./README.md /app/README.md
COPY ./pyproject.toml /app/pyproject.toml
COPY ./setup.cfg /app/setup.cfg
COPY ./Makefile /app/Makefile
COPY ./.env /app/.env
COPY api/api.py /app/api.py
COPY requirements.txt /app/requirements.txt
COPY credit_score_mlops /app/credit_score_mlops
COPY params.yaml /app/params.yaml
COPY api.yaml /app/api.yaml
COPY README.md /app/README.md
COPY pyproject.toml /app/pyproject.toml
COPY setup.cfg /app/setup.cfg
COPY Makefile /app/Makefile

# Run make requirements
RUN sudo apt-get -y install make
Expand All @@ -25,4 +24,4 @@ RUN make requirements
EXPOSE 8080

# Run FastAPI app
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "8080"]
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "8080"]
Loading