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

Desafio kubernets #24

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#BUSCANDO IMAGEM
FROM python

#CRIANDO O DIRETÓRIO
WORKDIR /app

#ADICIONANDO OS REQUIREMENTS
COPY requirements.txt .

#EXECUTAR COMANDO DO REQUIREMENTS
RUN pip install -r requirements.txt

#COPIAR TODOS AS INSTALAÇÕES
COPY . /app/

#EXPOR A PORTA DE EXCUÇÃO
EXPOSE 5000

#INICIALIZAÇÃO DO PROJETO
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]
33 changes: 33 additions & 0 deletions K8s/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: conversao-distancia
spec:
replicas: 1
selector:
matchLabels:
app: conversao-distancia
template:
metadata:
labels:
app: conversao-distancia
spec:
containers:
- name: conversao-distancia
image: davez99/conversao-distancia:v1
ports:
- containerPort: 5000
---

apiVersion: v1
kind: Service
metadata:
name: conversao-distancia
spec:
selector:
app: conversao-distancia
ports:
- port: 80
targetPort: 5000
nodePort: 30001
type: NodePort
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# conversao-distancia
# conversao-distancia


[Docker hub](https://hub.docker.com/repository/docker/davez99/conversao-distancia/general "Repositorio do desafio")

**Arquivo Deployment: Manifesto**

--------------------------------------

conversao-distancia
└── k8s
└── deployment.yaml
Binary file added images/DESAFIO-DOCKER-AMBIENTE-WEB.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/DESAFIO-DOCKER-CONTAINER.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/DESAFIO-DOCKER-IMAGEM.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.