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

Criando app simples #5

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
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
8b0be08
Criei um app simples para realizar os testes de cicd
virgiliojr94 Jul 4, 2023
04b3b11
criando o tester workflow para abertura de pr
virgiliojr94 Jul 4, 2023
05caa10
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
1942b9c
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
b7514e0
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
56cfcda
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
3c9dd93
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
19e9efb
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
404a655
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
4b39587
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
313edd7
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
e36b737
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
13b5db2
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
d836ac0
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
c67a777
update workflow pr
virgiliojr94 Jul 4, 2023
a643deb
update workflow pr
virgiliojr94 Jul 4, 2023
287c09f
update workflow pr
virgiliojr94 Jul 4, 2023
34ccdd2
update workflow pr
virgiliojr94 Jul 4, 2023
5af2dd3
update workflow pr
virgiliojr94 Jul 4, 2023
442c963
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
efb80e1
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
52b9a8d
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
9106478
Update pr-docker-image.yaml
virgiliojr94 Jul 4, 2023
6fadc81
update workflow pr
virgiliojr94 Jul 4, 2023
3b14b59
Create README.md
virgiliojr94 Apr 6, 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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__
4 changes: 2 additions & 2 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
context: .
push: true
tags: virgiliojr/httpbin-chat2desk_httpbin:latest
tags: virgiliojr/app-simples:latest

Azure:
permissions:
Expand Down Expand Up @@ -73,6 +73,6 @@ jobs:
name: Deploys application
with:
action: deploy
images: virgiliojr/httpbin-chat2desk_httpbin:latest
images: virgiliojr/app-simples:latest
manifests: ${{ env.DEPLOYMENT_MANIFEST_PATH }}
imagepullsecrets: docker-image-pull-secret
41 changes: 41 additions & 0 deletions .github/workflows/pr-docker-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test Docker Image

on:
pull_request:


env:
TEST_TAG: user/app:test
LATEST_TAG: user/app:latest

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and export to Docker
uses: docker/build-push-action@v4
with:
context: .
load: true
tags: ${{ env.TEST_TAG }}
-
name: Test
run: |
docker run -d ${{ env.TEST_TAG }}

18 changes: 4 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
env/
build/
dist/
.eggs/
.workon
.epio-app
__pycache__/
*.pyc
.tox
*.egg-info
*.swp
.vscode/
*.tfstate
*.tfstate.backup
*.tfvars
.terraform/
*.pyo
*.pyd
venv/
21 changes: 0 additions & 21 deletions .terraform.lock.hcl

This file was deleted.

25 changes: 0 additions & 25 deletions AUTHORS

This file was deleted.

23 changes: 7 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
FROM ubuntu:18.04
FROM python:3.7-alpine

LABEL name="httpbin"
LABEL version="0.9.2"
LABEL description="A simple HTTP service."
LABEL org.kennethreitz.vendor="Kenneth Reitz"
WORKDIR /app

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
COPY requirements.txt .

RUN apt update -y && apt install python3-pip git -y && pip3 install --no-cache-dir pipenv gevent
RUN pip install --no-cache-dir -r requirements.txt

ADD Pipfile Pipfile.lock /httpbin/
WORKDIR /httpbin
RUN /bin/bash -c "pip3 install --no-cache-dir -r <(pipenv lock -r)"
COPY . .

ADD . /httpbin
RUN pip3 install --no-cache-dir /httpbin
EXPOSE 5000

EXPOSE 80

CMD ["gunicorn", "-b", "0.0.0.0:80", "httpbin:app", "-k", "gevent"]
CMD ["python", "app-simples.py"]
15 changes: 0 additions & 15 deletions LICENSE

This file was deleted.

3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

18 changes: 0 additions & 18 deletions Pipfile

This file was deleted.

Loading
Loading