Summary

This chapter introduced you to how to build images and run containers with your own microservices using Docker. We packed all of the microservices we created in Chapter 9, Simple REST Definition and Request Routing with Frameworks, and Chapter 11Involving Concurrency with Actors and the Actix Crate, and learned how to build images manually and start a container. We also added the dbsync worker, which applied all necessary migrations and prepared a database for use with the users and content microservices.

Also, we considered approaches to hiding the source code of a microservice and used the cache of a container to copy a compiled binary to an empty image without building artifacts.

In the second half of the chapter, we learned how to run multiple microservices with necessary dependencies (such as databases and mail servers) at once. We used the Docker Compose tool to describe the configuration of a microservice set with a running order and port forwarding. We also learned how to attach volumes to services (containers), to store persistent data, and to allow you to restart an application without any risk of losing data.

In the next chapter, we will learn how to automate building microservices using continuous integration tools, helping you deliver the latest release of your product faster.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.203.96