Skip to content

Vue.js and Node.js frontend for StockTrader 🚀

License

Notifications You must be signed in to change notification settings

ibm-garage-dach/tradr

 
 

Repository files navigation

tradr

This is a new Node.js-hosted and Vue.js-based user interface for StockTrader. It calls the default portfolio JAX-RS web services when interacting with stock portfolios. As such portfolio must be exposed via ingress for tradr to work properly.

Note: There is a bug where the UI does not function if the portfolio database is empty.

Prerequisites

Along with the jwt and oidc secrets required for the trader service to work tradr requires a secret defining the ingress host and port where tradr will run. You create this secret by running:

kubectl create secret generic ingress-host --from-literal=host=<PROXY_HOSTNAME>:<PROXY_SSL_PORT>

# Example:
kubectl create secret generic ingress-host --from-literal=host=myicpproxy.ibm.com:443

# Or
kubectl create secret generic ingress-host --from-literal=host=myicpproxy.ibm.com:443 -n stock-trader

You'll also need to enable login to the IBM Cloud Private internal Docker registry by following [these steps] (https://www.ibm.com/support/knowledgecenter/en/SSBS6K_2.1.0/manage_images/configuring_docker_cli.html). Don't forget to restart Docker after adding your cert. On macOS you can restart Docker by running:

osascript -e 'quit app "Docker"'
open -a Docker

Build and Deploy

To build tradr clone this repo and run:

docker build -t tradr:latest -t <ICP_CLUSTER>.icp:8500/stock-trader/tradr:latest .
docker tag tradr:latest <ICP_CLUSTER>.icp:8500/stock-trader/tradr:latest
docker push <ICP_CLUSTER>.icp:8500/stock-trader/tradr:latest

kubectl apply -f manifests/

In practice this means you'll run something like:

docker build -t tradr:latest -t mycluster.icp:8500/stock-trader/tradr:latest .
docker tag tradr:latest mycluster.icp:8500/stock-trader/tradr:latest
docker push mycluster.icp:8500/stock-trader/tradr:latest

kubectl --namespace stock-trader apply -f manifests/

Once the tradr containers start you can reach the new UI by navigating to https://<PROXY_HOSTNAME>:<PROXY_SSL_PORT>/tradr. Using the previous example that is: https://myicpproxy.ibm.com/tradr (since https is port 443 you can drop the ssl port from the URL in this example).

About

Vue.js and Node.js frontend for StockTrader 🚀

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 56.7%
  • SCSS 23.7%
  • JavaScript 17.0%
  • Shell 1.9%
  • HTML 0.3%
  • Dockerfile 0.3%
  • Pug 0.1%