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.
Creating a Terraform Docker Compose service
From the course: DevOps Foundations: Your First Project
Creating a Terraform Docker Compose service
- [Instructor] And the last thing we're going to do is install it in Docker Compose, which is really easy. So I'm going to open up my YAML, and I'm going to add a new service, up here, called Terraform, and much like our website we need to build the image, so I'm going to do build and then context, our current directory, and that's literally it, really simple, because we're just making this available in our Docker Compose as a service, and it doesn't have any other options, so very easy. I'm going to save that, I'm going to quit, and I'm going to just verify that this runs within Compose with docker-compose run. This is a single one-shot command so I can use run here. I don't want to save this container, so --rm and then terraform. One thing I forgot to do, provide the Dockerfile. So let's go ahead and do that, here, with the Dockerfile option. So the Dockerfile option tells Docker Compose to use a differently named…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Creating the Terraform Dockerfile8m 58s
-
Building and testing a Terraform Docker image4m 32s
-
Creating a Terraform Docker Compose service1m 50s
-
AWS deployment explained3m 56s
-
Writing Terraform code12m 35s
-
Reviewing the Terraform plan9m 15s
-
Applying the Terraform plan7m 35s
-
Deploying the website into AWS S35m 48s
-
Destroying the website from AWS S36m 1s
-
Writing your integration test5m 55s
-
Running your integration test4m 58s
-
-
-