Giter VIP home page Giter VIP logo

rolique-test-task's Introduction

rolique-test-task

Prerequisites

  • Docker CE v17

How to run

All docker containers are saved at Docker Hub. You can pull them and run locally. If you want to buid docker containers by yourself, go to the How to build section.

Run MongoDB instances for services:

sudo docker run --name users-mongo-db -d mongo
sudo docker run --name books-mongo-db -d mongo

All running containers have unic IP address in our system. To get it run:

sudo docker network inspect bridge

Also you can filter the result to get IP of service you need:

sudo docker network inspect bridge | grep users-mongo-db -B 1 -A 5

Result of previous command execution:

"1a6da99187c271beab74d58ca1bdbda90f1b3000048ae418fc35bc3118b91df1": {
	"Name": "users-mongo-db",
	"EndpointID": "0c08212c93ee20e44770e6d023d4a101007013ae616b8ba23509e117bdc90016",
	"MacAddress": "02:42:ac:11:00:02",
	"IPv4Address": "172.17.0.2/16",
	"IPv6Address": ""
}

Run Users service (if needed change IP):

sudo docker run --name users-service -e MONGO_ADDRESS=172.17.0.2 -d erdtr/users-service

Run Books service:

sudo docker run --name books-service -e MONGO_ADDRESS=172.17.0.3 -d erdtr/books-service

Run Gateway service:

sudo docker run --name gateway-service -e USERS_API_ADDRESS=172.17.0.4 -e BOOKS_API_ADDRESS=172.17.0.5 -d erdtr/gateway-service

Run Proxy service:

sudo docker run --name proxy-service -e GATEWAY_API_ADDRESS=172.17.0.6 -p 80:8080 -d erdtr/proxy-service

Finnally, you can test it.

List of all users http://localhost/users

List of all books http://localhost/books

How to build

In progress...

API

In progress...

rolique-test-task's People

Contributors

erdtr avatar

Watchers

James Cloos 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.