Giter VIP home page Giter VIP logo

oracledb_example's Introduction

Example of node-oracledb within Docker

This repo is meant to demonstrate how to move a Node.js app, which depends node-oracledb, within a Docker Image.

You may try this example with these steps:

  1. git clone https://github.com/bchr02/oracledb_example
  2. cd oracledb_example
  3. edit lines 16-18 within app.js and change the username, password and connectString so that it matches your environment. Also, change the query on line 25 to something that will work with your database.
  4. docker build -t test/oracledb_example .
  5. docker run -d test/oracledb_example

Now if you check the logs you should see the results of your query. docker logs CONTAINERID

Here is how I created this example:

  1. create a new app folder. I will refer to this folder as your app folder.
  2. copy Dockerfile into your app folder
  3. copy the rest of your Node.JS app into your app folder
  4. within the app folder create another folder titled oracle and within that folder create another folder titled instantclient
  5. download the the free Basic and SDK ZIPs from Oracle Technology Network
  6. extract the contents of both ZIPs into the instantclient folder

If you plan to push to a git repository you must use Git Large File Storage for the Oracle libraries because GitHub doesn't allow files larger than 50MB or totaling over 100MBs. Therefore, before you git add you must:

  1. be sure to have Git Large File Storage installed (free)
  2. once Git LFS is installed, you must run git lfs install. This only needs to be done once per machine.
  3. from within the app folder run git lfs track "oracle/**/*" this will allow the large files within the oracle folder to be pushed and not get errors such as these: this exceeds GitHub's file size limit of 100.00 MB
  4. now you can git add -A and then git commit -m "First Commit"

oracledb_example's People

Contributors

bchr02 avatar

Watchers

 avatar  avatar  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.