Docker Compose is the easiest way to do local deployments for testing and development.
Run the following command to install docker compose:
brew install docker-compose
Makes sure you are in the build directory by running the following:
cd build
You can use the docker-compose up
command to manually spin up containers:
docker-compose up -d --build <container name>
Here are some examples:
docker-compose up -d --build 401k-calculator-api # spins up the 401k calculator api container docker-compose up -d --build webapp # spins up the webapp container
You can deploy all of the containers by running the following command:
docker-compose up --build -d
You can bring down all containers by running the following command:
docker-compose down
You can find all of the makefile targets here.
Makes sure you are in the build directory by running the following:
cd build
You can deploy (and redeploy) all of the containers by running:
make up_build
Minikube is how we can locally deploy our kubernetes cluster.
Run the following command to install minikube:
brew install minikube
We need to update our /etc/hosts file to properly route requests to our minikube cluster. We can do that by adding the following line to /etc/hosts file
127.0.0.1 cultivatefinance.org
You can do that with a single command:
sudo echo '127.0.0.1 cultivatefinance.org' >> /etc/hosts
minikube start
minikube addons enable ingress
cd build make k_deploy_ingress # deploys our ingress make k_deploy_webapp # deploys the webapp service make k_deploy_nats # deploys our NATS message queue make k_deploy_api # deploys our API Gateway make k_deploy_401k # deploys our 401k API
sudo minikube tunnel