Git Product home page Git Product logo

restclient-docker101-201's Introduction

AlphaOffice RESTClient buildout

These scripts suuport the Docker 101-201 Workshops for the AlphaOffice usecase.

The Dockfile will build a new image locally in your docker environment. It pulls the Oracle Instant Client 12.2.x from the Oracle Docker Store as the baseline.

The image contains a Node.js application used to connect to defined datasources. Right now it supports Oracle 12c DB, MYSQL and a flat JSON file containing the PRODUCTS list used in the AlphaOffice Catalog UI.

It runs in conjunction with any of the above datasources. In the case of an Oracle DB or MYSQL DB these databases need to already be running in other containers on the same docker subnet. They have also been populated with the AlphaOffice schema that is queried via this REST interface. The interface in turn is referenced from the Product Catalog UI container.

This image is targeted towards supporting the advanced docker workshops created within the Solution Engineering group of Oracle Corporation.

To Build:

  1. Change into the directory where the Dockerfile resides
  2. docker build -t npm/restclient .

To Run: (Depends on your datasource. These examples assume an Oracle or MYSQL datasource populated with the Alpha Office schema) The creation and population of those datasource containers are part of the Docker workshop series and require support files from another git repo)

Example for Oracle DB: (Assumes container hostname to be 'oracledb-ao')

docker run -d -it --rm --name restclient -p=8002:8002 --link orcl:oracledb-ao -e ORACLE_CONNECT='oracledb-ao/orclpdb1.localdomain' -e DS='oracle' npm/restclient

Example for MYSQL DB: (Assumes container hostname to be 'mysqldb-ao')

docker run -d -it --rm --name restclient -p=8002:8002 --link mysql:mysqldb-ao -e MYSQL_HOST='mysqldb-ao' -e DS='mysql' npm/restclient

Example for JSON file:

docker run -d -it --rm --name restclient -p=8002:8002 -e DS='json' npm/restclient

When running you can test in a local browser at "localhost:8002/products". You should get 57 JSON formatted records returned...

restclient-docker101-201's People

Contributors

wvbirder avatar

Watchers

James Cloos avatar Jinsong Lu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.