application-module

sub-modules in the application

Project directory structure

.
├── backend-submodule # All the files related to backend lives here
│   ├── app
│   │   ├── __init__.py
│   │   └── main.py
│   ├── Dockerfile # backend docker file
│   ├── README.md
│   └── requirements.txt
├── docker-compose.yml # Docker-compose file to run all the sub-module from the app directory
├── frontend-submodule # All the frontend related sub-module lives here
│   ├── app
│   │   ├── app.py
│   │   ├── __init__.py
│   │   └── settings.py
│   ├── Dockerfile # frontend docker file
│   ├── README.md
│   └── requirements.txt
└── README.md 

Adding sub-modules

git submodule add https://github.com/pandalearnstocode/frontend-submodule
git submodule add https://github.com/pandalearnstocode/backend-submodule
git add .
git commit -m "adding sub-modules."
git push origin develop
git config submodule.recurse true

Cloning this repo

git clone https://github.com/pandalearnstocode/application-module.git
git submodule update --init

Docker-compose

docker-compose build
docker-compose up
docker-compose down

Generate Kubernetes config files

kompose convert
minikube start
kubectl get nodes
minikube status
kubectl apply -f backend-deployment.yaml,backend-service.yaml,fronend-deployment.yaml,fronend-service.yaml
kubectl delete -f backend-deployment.yaml,backend-service.yaml,fronend-deployment.yaml,fronend-service.yaml
minikube stop

Reference: