Data definition – RecommendationService
Let's begin the technical development of our RecommendationService
microservice by creating a container with the database that will be used. In the case of our microservices, we will use a database based on graphs—the Neo4j. The behavior of this database is very interesting, besides being easy to implement, thus being a perfect example for our application.
In our docker-compose.yml
file, we make a small change by adding Neo4j to our stack:
recommendation_db: image: neo4j:latest ports: - "7474:7474" - "7687:7687" environment: NEO4J_AUTH: "none"
With this simple particle of code, we already have an instance of Neo4j inside a Docker container.