From the course: DevOps Foundations: Your First Project

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Setting up your Docker Compose service

Setting up your Docker Compose service

From the course: DevOps Foundations: Your First Project

Start my 1-month free trial

Setting up your Docker Compose service

- [Instructor] So now we have a simple unit test and I just saved that file and closed it, and now we're going to edit our Docker Compose so that we can actually run these tests, so let me go ahead and open up Docker Compose, and this should look familiar, it's the Docker Compose for our website, so we're going to add on top of this by creating another service just to run unit tests, so let me have my unit-tests service. So every service starts with a name and is Tab, two Spaces, let me go ahead and do that again. I Tab, two Spaces, and then I type the name of the service that I want, in this case that's unit-tests, and then what I'm going to do is, I'm going to use the volume command to tell Docker Compose to mount my existing volume to the container. Now, let me go ahead and type this, it's actually volumes. We're going to say we want to mount our current directory to /app, so what this is going to do is it's going to…

Contents