From 4d85873d6e34bf54ac24621ff4e4a86514289363 Mon Sep 17 00:00:00 2001 From: Jonas Ribeiro Date: Wed, 25 Jan 2023 17:02:18 -0300 Subject: [PATCH 1/2] Dockerfile test --- src/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/Dockerfile diff --git a/src/Dockerfile b/src/Dockerfile new file mode 100644 index 000000000..3bcd69739 --- /dev/null +++ b/src/Dockerfile @@ -0,0 +1,7 @@ +FROM node:18.11.0 +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . . +EXPOSE 8080 +CMD ["node", "server.js"] \ No newline at end of file From b997443aed870b029012efeca528c7eb3dc05bc9 Mon Sep 17 00:00:00 2001 From: Jonas Ribeiro Date: Sat, 28 Jan 2023 09:48:31 -0300 Subject: [PATCH 2/2] deployment kubernetes --- k8s/deployment.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 k8s/deployment.yaml diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml new file mode 100644 index 000000000..4217c46b8 --- /dev/null +++ b/k8s/deployment.yaml @@ -0,0 +1,33 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: web +spec: + replicas: 5 + selector: + matchLabels: + app: web + template: + metadata: + labels: + app: web + spec: + containers: + - name: web + image: jonasjrf/conversao-temperatura:v1 + ports: + - containerPort: 8080 + +--- +apiVersion: v1 +kind: Service +metadata: + name: web-page +spec: + selector: + app: web + type: NodePort + ports: + - port: 80 + targetPort: 8080 + protocol: TCP