Skip to content

Commit

Permalink
fix: removendo build docker
Browse files Browse the repository at this point in the history
  • Loading branch information
heltonricardo committed Dec 14, 2023
1 parent 8ee6170 commit 31363c1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ jobs:
- name: Train Model
run: python train.py

build_image:
name: Build image
runs-on: ubuntu-latest
needs: [train_pipeline]
steps:
- uses: actions/checkout@v2
- name: Docker Login
run: docker login -u ${{secrets.DOCKER_USER}} -p ${{secrets.DOCKER_PASSWORD}}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag ${{secrets.DOCKER_USER}}/${{secrets.DOCKER_IMAGE_NAME}}
# build_image:
# name: Build image
# runs-on: ubuntu-latest
# needs: [train_pipeline]
# steps:
# - uses: actions/checkout@v2
# - name: Docker Login
# run: docker login -u ${{secrets.DOCKER_USER}} -p ${{secrets.DOCKER_PASSWORD}}
# - name: Build the Docker image
# run: docker build . --file Dockerfile --tag ${{secrets.DOCKER_USER}}/${{secrets.DOCKER_IMAGE_NAME}}

- name: Docker Push
run: docker push ${{secrets.DOCKER_USER}}/${{secrets.DOCKER_IMAGE_NAME}}
# - name: Docker Push
# run: docker push ${{secrets.DOCKER_USER}}/${{secrets.DOCKER_IMAGE_NAME}}
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3.9
FROM python:3.9
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY ./app /code/app
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY ./app /code/app

CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]

0 comments on commit 31363c1

Please sign in to comment.