Skip to content

humadev/docker-compose-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Compose & Kubernetes Demo

This project demonstrates a simple 3-tier application (React Frontend, Node.js API, MySQL Database) capable of running on Docker Compose or Kubernetes (Minikube).

Prerequisites

  • Docker
  • Minikube
  • kubectl

Running on Minikube

  1. Start Minikube

    minikube start
  2. Build Images in Minikube Engine Important: You must build the images inside Minikube's Docker daemon so that the pods can find them (since we use imagePullPolicy: Never).

    eval $(minikube docker-env)
    docker build -t kub-api ./api
    docker build -t kub-app ./app

    (Alternatively, use minikube image build -t kub-api ./api etc.)

  3. Apply Kubernetes Manifests

    kubectl apply -f k8s/
  4. Verify Deployment Check that all pods are running:

    kubectl get pods
  5. Access the Application To access the Frontend in your browser:

    minikube service app-service

    To access the API directly (optional):

    minikube service api-service

Cleanup

kubectl delete -f k8s/
minikube stop

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •