Gift Galaxy using microservices.
- Clone the repository.
- Find the microservices you need, go to the service directories and run the applications.
- Open the terminal and run
docker-compose up -d
. - Open the database management tool and connect to the database.
- Using Database Management Tool to connect to the database.
host: localhost:27017 username: spring password: password
- Open a console and create a database named
users
.use users db.createCollection("users")
- Using Database Management Tool to connect to the database.
host: localhost:5432 username: postgres password: password database: recommendations
- Set up the following secrets in the repository settings.
DOCKERHUB_TOKEN DOCKERHUB_USERNAME DIGITALOCEAN_ACCESS_TOKEN
- For local development
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm repo update helm upgrade --install ingress-nginx ingress-nginx \ --repo https://kubernetes.github.io/ingress-nginx \ --namespace ingress-nginx --create-namespace
- For production
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm repo update kubectl create namespace ingress-nginx helm upgrade ingress-nginx ingress-nginx/ingress-nginx -f .k8s/values-ingress-nginx.yaml -n ingress-nginx --install
- Copy from example and setup secrets.
cp ./k8s/recommendation-secret-example.yaml ./k8s/recommendation-secret.yaml cp ./k8s/user-secret-example.yaml ./k8s/user-secret.yaml
- Create secrets.
kubectl apply -f ./k8s/recommendation-secret.yaml kubectl apply -f ./k8s/user-secret.yaml
- Add PVCs to the cluster.
kubectl apply -f ./k8s/pvc-recommendation-postgres.yaml kubectl apply -f ./k8s/pvc-user-mysql.yaml
- Run the following command to start the application.
make dev
- Add the following to your host file
sudo vim /etc/hosts
.127.0.0.1 user.giftgalaxy.dev 127.0.0.1 recommendation.giftgalaxy.dev
- Try
http://user.giftgalaxy.dev/api/v1/ping
andhttp://recommendation.giftgalaxy.dev/api/v1/ping
in your browser.