Skip to content

Roshan98b/Planner-App

Repository files navigation

Planner App

This project was bootstrapped with Create React App.

Run locally

Installs all the dependencies.

npm install

Runs the application locally.

npm start

Build the application to .\build directory.

npm run build

Run using Docker

Build image from Dockerfile and apply appropriate version tag. The new image would get latest tag.

docker build -t plannerapp:<version> -t plannerapp:latest .

Create the container using latest image and map ports from 80 on container to targetPort.

docker run --name plannerapp -p <targetPort>:80 --rm plannerapp:latest

Create a container and map shell to terminal.

docker run --name plannerapp -p <targetPort>:80 --rm -it plannerapp:latest /bin/sh

Map shell to terminal of a running container.

docker exec -it plannerapp sh

Clone the image with Docker Registry Name.

docker tag plannerapp:latest <DockerRegistryName>/plannerapp:latest

Push the image to Docker Registry

docker push <DockerRegistryName>/plannerapp:latest

Get the logs from the container. Argument -f is used to follow the logs and would reflect updates from the container.

docker container logs -f plannerapp

Kubernetes deployment

Create the Nginx Ingress Controller using Helm in a new namespace.

kubectl create namespace ingress-nginx

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx

helm install ingress-nginx ingress-nginx/ingress-nginx -n ingress-nginx --set controller.replicaCount=2

Deploy the application which creates a deployment and a service. Uses a new namespace plannerapp for the deployment.

kubectl apply -f .\manifests\plannerapp.yaml -n plannerapp

Deploy the ingress rules on the new namespace plannerapp which uses the Nginx Ingress Controller previously deployed.

kubectl apply -f .\manifests\ingress.yaml -n plannerapp

Map running pod shell to the terminal. Use kubectl get pods to get the pod name.

kubectl exec --stdin --tty <pod-name> -n plannerapp  -- sh

Get the logs of the ingress controller for debugging server failures.

kubectl logs -n ingress-nginx <ingress-controller-pod>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •