diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cd027ac --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/README.md b/README.md index 09e6f41..32cc499 100644 --- a/README.md +++ b/README.md @@ -1 +1,5 @@ -# conversao-distancia \ No newline at end of file +# conversao-distancia + + +# Link DockerHUB +- https://hub.docker.com/repository/docker/romarionex88/conversao-distancia/general diff --git a/deployment.yaml b/deployment.yaml new file mode 100644 index 0000000..de41056 --- /dev/null +++ b/deployment.yaml @@ -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 \ No newline at end of file diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml new file mode 100644 index 0000000..de41056 --- /dev/null +++ b/k8s/deployment.yaml @@ -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 \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 39d2323..b1c2a50 100644 --- a/templates/index.html +++ b/templates/index.html @@ -71,7 +71,7 @@

Valor Convertido