Data orchestration

In shared data patterns, there is no need for the orchestration of data, because the microservices will use the same physical component for storage of the data. In the case of our related microservice, News, this can be seen in the docker-compose.yml file of our application.

In our archive, we add that MongoDB is our database. The declaration is done very simply by giving a name to the container, specifying the door where MongoDB will be exposed, and giving the command that should be executed for the functioning of Mongo:

mongo: 
    image: mongo:latest 
    container_name: "mongodb" 
    ports: 
        - 27017:27017 
    command: mongod --smallfiles --logpath=/dev/null # --quiet 

Now, we add the microservices that we created earlier. The three offices ...

Get Microservice Patterns and Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.