Sign inSign up

simplusinnov/turing-geolocation-report

By simplusinnov

Updated almost 4 years ago

Image
0

50K+

simplusinnov/turing-geolocation-report repository overview

Readme

For developers

Installation

All microservice basic dependencies are listed in the package.json file, hence there is no need to install any global packages. Simply run npm install.

npm install

NOTE: if you required additional packages, ensure you install using --save-exact so that your project is compatible when other developers contribute.

Example:

npm install http-proxy --save --save-exact
Start development server
npm start
Run tests

Test cases be written and then added to the ./test/index.ts file for compilation. Yaou are also able to add tests to the

Deployment
Prerequites

Before deploying, the following prerequisites need to met:

  • Docker needs to be installed on the host server.
  • bridge network needs to be created using docker on the host server to link microservices.
  • git needs to be installed on the host server.
  • ssh key link to project so that git pull is possible using ssh.
  • npm token (optional) so that you can install @simplus packages if there is such a dependency.
Installation
  1. clone solution To install the solution, first clone the repo to the host server

    git clone [email protected]:simplusinnovation/GeoLocation-Report.git
    

    In some cases, you may need to activate your ssh-agent to link your local private key to the command in the following manner:

    eval $(ssh-agent -s) && $(ssh-add /path/to/your/.ssh/id_rsa; git pull [email protected]:simplusinnovation/GeoLocation-Report.git)
    
  2. build docker container move to cloned folder.

    cd GeoLocation-Report
    

    sudo docker build -t ms:GeoLocation-Report .

  3. run the container run the container using the --network flag, linking the container to the bridge network you created on server.

    sudo docker run --network 'mynetwork' -p <hostport>:<containerport> -d --name GeoLocation-Report --restart always ms:GeoLocation-Report
    
  4. test server open http://localhost:port/api/v1/GeoLocation-Report/ in your browser.

Technical users

The microservice has the following standard urls:

Scripts

Tag summary

Content type

Image

Digest

Size

57.3 MB

Last updated

almost 6 years ago

docker pull simplusinnov/turing-geolocation-report