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

OK #18

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

OK #18

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
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM python
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . /app/
EXPOSE 5000
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# conversao-distancia
# conversao-distancia


# Link DockerHUB
- https://hub.docker.com/repository/docker/romarionex88/conversao-distancia/general
32 changes: 32 additions & 0 deletions deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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: fabricioveronez/conversao-distancia:v2
ports:
- containerPort: 5000
---
apiVersion: v1
kind: Service
metadata:
name: conversao-distancia
spec:
selector:
app: conversao-distancia
ports:
- port: 80
targetPort: 5000
nodePort: 30000
type: NodePort
32 changes: 32 additions & 0 deletions k8s/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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: fabricioveronez/conversao-distancia:v2
ports:
- containerPort: 5000
---
apiVersion: v1
kind: Service
metadata:
name: conversao-distancia
spec:
selector:
app: conversao-distancia
ports:
- port: 80
targetPort: 5000
nodePort: 30000
type: NodePort
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ <h3>Valor Convertido</h3>
</main>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Servidor que processou a requisição: {{ hostname }} (IP: {{ ip_address }})</span>
<span class="text-muted">Versão 2.0 - Servidor que processou a requisição: {{ hostname }} (IP: {{ ip_address }})</span>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
Expand Down