Skip to content

Commit

Permalink
Clean commands
Browse files Browse the repository at this point in the history
  • Loading branch information
KarthikUdyawar committed Aug 16, 2023
1 parent 51550ad commit 5a201ee
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 51 deletions.
47 changes: 1 addition & 46 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,6 @@ jobs:
steps:
- uses: actions/checkout@v3

# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: "3.10"

# - name: Start MongoDB
# uses: supercharge/[email protected]
# with:
# mongodb-version: 5.0.5
# mongodb-replica-set: test-rs
# mongodb-port: 27017

# - name: Install dependencies
# run: pip install -r requirements.txt

# - name: Build package
# run: pip install -e .

# - name: Generate kaggle.json
# env:
# KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }}
# KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }}
# run: python src/utils/generate_kaggle_keys.py

# - name: Build pipeline
# run: python src/utils/build_pipeline.py

- name: DockerHub Login
uses: docker/[email protected]
with:
Expand All @@ -56,32 +29,14 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/passwordometer-api:1.0.1
tags: ${{ secrets.DOCKERHUB_USERNAME }}/passwordometer-api:1.1.0
secrets: |
"KAGGLE_USERNAME=${{ secrets.KAGGLE_USERNAME }}"
"KAGGLE_KEY=${{ secrets.KAGGLE_KEY }}"
"MONGODB_CONN_STRING=${{ secrets.MONGODB_CONN_STRING }}"
#? ---------------------------------------------------------------------------

# - name: Build the Docker image
# # run: docker build . --file Dockerfile --tag ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
# run: docker build . --file Dockerfile --env KAGGLE_USERNAME=${{ secrets.KAGGLE_USERNAME }} KAGGLE_KEY=${{ secrets.KAGGLE_KEY }} MONGODB_CONN_STRING=${{ secrets.MONGODB_CONN_STRING }} --tag ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} --port 80:80
# env:
# IMAGE_NAME: passwordometer-api
# TAG: 1.0.1
# KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }}
# KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }}
# MONGODB_CONN_STRING: ${{ secrets.MONGODB_CONN_STRING }}

# - name: Docker Push
# run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
# env:
# IMAGE_NAME: passwordometer-api
# TAG: 1.0.1

#? ---------------------------------------------------------------------------

# - name: Login in Github
# run: |
# echo ${{ secrets.API_GITHUB_TOKEN }} | docker login ghcr.io -u ${{ secrets.API_GITHUB_TOKEN }} --password-stdin
Expand Down
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ RUN --mount=type=secret,id=KAGGLE_USERNAME \
export MONGODB_CONN_STRING=$(cat /run/secrets/MONGODB_CONN_STRING) && \
python src/utils/build_pipeline.py

# RUN python src/utils/generate_kaggle_keys.py

# RUN python src/utils/build_pipeline.py

EXPOSE 80

CMD ["uvicorn", "src.api.app:app", "--workers", "4", "--host", "0.0.0.0", "--port", "80"]
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_long_description(file_path: str = "README.md") -> str:

setup(
name="Passwordometer",
version="1.0.0",
version="1.1.0",
author="Karthik Udyawar",
author_email="[email protected]",
license="MIT",
Expand Down

0 comments on commit 5a201ee

Please sign in to comment.