GithubHelp home page GithubHelp logo

kubernetes-node-app's Introduction

Docker image URL:

https://hub.docker.com/layers/ankitdawra/nodejs-image/latest/images/sha256-ad4a183b77a005e877af1df23644f64a37b758684e62a9b7f5fede2a55bd64b4?context=repo


Setup guidelines:

Step 1: Start all the containers, services with the below command

kubectl apply -f __db_volume.yaml && kubectl apply -f __configMaps.yaml && kubectl apply -f __secrets.yaml && kubectl apply -f __db_deployment.yaml && kubectl apply -f __deployment.yaml

Note: (In case of any issues, we can delete all containers, services, configMaps etc.. by runnine below command and start afresh from step 1)

kubectl delete -f __deployment.yaml && kubectl delete -f __db_deployment.yaml && kubectl delete -f __secrets.yaml&& kubectl delete -f __configMaps.yaml && kubectl delete -f __db_volume.yaml

Step 2: Database Import

docker cp db.sql [mysql_container_id]:/db.sql (Copy the database file to db container)
docker exec -it [mysql_container_id] /bin/bash (exec into db container)
mysql -u root -p (login into mysql)
ENTER PASSWORD as "password"
source db.sql (Run db.sql file to import database)

Note: We can find mysql_container_id from "docker ps" command

Step 3: Run the application

Run the application on http://localhost:5000 if you are running on local or http://[IP_ADDR]:5000 where IP_ADDR is IP address where your node-js service is exposed.

If everything works well, you will see something like this: image


In case of errors, you might see these screens:

When Database server not configured properly
image
When Database not setup properly
image
When no user record exists
image

kubernetes-node-app's People

Contributors

ankitdawranagarro avatar ankitdawra avatar

Watchers

 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.