Defining Multiple Objects in the Same YAML file

In this lesson, we will define all the objects used thus far in a single YAML file.

Defining Multiple Objects In The Same YAML file

The vfarcic/go-demo-2 and mongo images form the same stack. They work together and having four YAML definitions is confusing. It would get even more confusing later on since we are going to add more objects to the stack. Things would be much simpler and easier if we would move all the objects we created thus far into a single YAML definition. Fortunately, that is very easy to accomplish.

Let’s take a look at yet another YAML file.

Get hands-on with 1200+ tech skills courses.