Skip to Content
Hands-On Microservices with Spring Boot and Spring Cloud
book

Hands-On Microservices with Spring Boot and Spring Cloud

by Magnus Larsson
September 2019
Intermediate to advanced
668 pages
15h 59m
English
Packt Publishing
Content preview from Hands-On Microservices with Spring Boot and Spring Cloud

The Docker Compose configuration

MongoDB and MySQL are declared as follows in the Docker Compose configuration file, docker-compose.yml:

mongodb:  image: mongo:3.6.9  mem_limit: 350m  ports:    - "27017:27017"  command: mongod --smallfilesmysql:  image: mysql:5.7  mem_limit: 350m  ports:    - "3306:3306"  environment:    - MYSQL_ROOT_PASSWORD=rootpwd    - MYSQL_DATABASE=review-db    - MYSQL_USER=user    - MYSQL_PASSWORD=pwd  healthcheck:    test: ["CMD", "mysqladmin" ,"ping", "-uuser", "-ppwd", "-h", "localhost"]    interval: 10s    timeout: 5s    retries: 10

The following is observed from the preceding code:

  1. We will use the official Docker image for MongoDB V3.6.9 and MySQL 5.7 and forward their default ports 27017 and 3306 to the Docker host, also made available on localhost ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Master Microservices with Spring Boot and Spring Cloud

Master Microservices with Spring Boot and Spring Cloud

In28Minutes Official

Publisher Resources

ISBN: 9781789613476Supplemental Content