This is a Red Hat OpenShift Data Access demo that is built with Node JS to demonstrate the Service Binding feature that is available in OpenShift. The application is built with a set endpoints over REST. It's aalso a great way to find out how to avoid Scurvy.
- Node JS to build the REST endpoints
- Database (Mysql, or PostgreSql compatible DBs)
- knex for DB migration
- Kube-service-bindings
- Compatible with RHODA/DBaaS platform
- Docker
- Node.js
- OpenShift
# Build the app with Postgresql
$ docker build -f Dockerfile-pg -t quay.io/<quay_acct>/fruit-app-nodejs-pg:v0.0.1 .
# Build the app with MySQL
$ docker build -f Dockerfile-mysql -t quay.io/<quay_acct>/fruit-app-nodejs-mysql:v0.0.1 .
# update yaml files under k8s folder to reflect your image path
# Deploy the app with Postgresql
oc apply -f k8s/deploy-nodejs-pg.yaml
# Deploy the app with MySQL
oc apply -f k8s/deploy-nodejs-mysql.yaml
- install all node components
npm i
- start a PostgreSQL database system using docker images
docker-compose up
- start up your server (should launch website)
SERVICE_BINDING_ROOT=${local_binding_path}/bindings_local node [app_mysql.js|app_pg.js]