Microservice that keeps a detailed history of all stock trades
If you wish to build locally, setup up your environment variables in your server.env file.
TOPIC="..."
BOOTSTRAP_SERVER="..."
CONSUMER_API_KEY="..."
MONGO_PASSWORD=...
MONGO_USER=...
MONGO_AUTH_DB=...
MONGO_IP=...
MONGO_PORT=...
MONGO_DATABASE=...
If you plan to deploy your application to a cloud environment, you can configure the same properties using Kubernetes Secrets. The bindings.yml links the secrets to the environment variables in the docker container.
Run this from the project directory root:
mvn clean install
To run the project from the target directory:
mvn liberty:run-server
The application should be accessible from http://localhost:9080
Build the docker container from the root directory:
docker build -t trade-history .
To run the docker containter locally:
docker run -p 9080:9080 trade-history
The application should be accessible from http://localhost:9080
Prerequisites:
Steps:
After building the docker container locally, use the helm chart from the charts directory to deploy:
helm package chart/tradehistory/ --debug
helm install tradehistory-1.0.0.tgz --name tradehistory-release