From 8fe57d659165ca8228b267e6eef66c7e720812f1 Mon Sep 17 00:00:00 2001 From: vinifurt Date: Thu, 20 Oct 2022 09:50:59 -0300 Subject: [PATCH 1/2] adicionado alteracoes conforme auka 2 --- src/Dockerfile | 6 ++++++ src/k8s/deployment.yaml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/Dockerfile create mode 100644 src/k8s/deployment.yaml diff --git a/src/Dockerfile b/src/Dockerfile new file mode 100644 index 00000000..fdfd49e3 --- /dev/null +++ b/src/Dockerfile @@ -0,0 +1,6 @@ +FROM node:18.11.0 +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . . +CMD ["node", "server.js"] \ No newline at end of file diff --git a/src/k8s/deployment.yaml b/src/k8s/deployment.yaml new file mode 100644 index 00000000..c4a04358 --- /dev/null +++ b/src/k8s/deployment.yaml @@ -0,0 +1,31 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: web +spec: + selector: + matchLabels: + app: web + template: + metadata: + labels: + app: web + spec: + containers: + - name: web + image: fabricioveronez/kube-news:v1 + ports: + - containerPort: 8080 +--- +apiVersion: v1 +kind: Service +metadata: + name: web +spec: + selector: + app: web + ports: + - port: 80 + targetPort: 8080 + nodePort: 30000 + type: NodePort \ No newline at end of file From c18ed39d0f52861630acfd390ffd68b3701f3b43 Mon Sep 17 00:00:00 2001 From: vinifurt Date: Thu, 20 Oct 2022 10:02:11 -0300 Subject: [PATCH 2/2] adicionado ultimas alteracoes 2 --- src/k8s/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k8s/deployment.yaml b/src/k8s/deployment.yaml index c4a04358..29df873d 100644 --- a/src/k8s/deployment.yaml +++ b/src/k8s/deployment.yaml @@ -13,7 +13,7 @@ spec: spec: containers: - name: web - image: fabricioveronez/kube-news:v1 + image: vinifurt22/conversao-temperatura:latest ports: - containerPort: 8080 ---