From the course: DevOps Foundations: Your First Project
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
Adding OpenTofu to Docker Compose
From the course: DevOps Foundations: Your First Project
Adding OpenTofu to Docker Compose
Now that we got the version of OpenTofu to use, let's go ahead and add it to our docker-compose.yaml. To do that, I'm going to type "vim", then "docker-compose.yaml" to open it in my editor. Next I'm going to look for the OpenTofu service. It should be pretty early in the manifest file. However, if you cannot find it, all you have to do is search for it, like I did here. So let's move to the image line down here. To save time, I went ahead and created the OpenTofu service for you However, you might be using an older version of OpenTofu in your copy of the exercise files. If that's the case, simply remove the version that's there and replace it with the version that we found on GitHub. Next, let's pay attention to the volumes that we're mounting down here. The first volume that we're mounting is this "website" folder. That's where our website is. The second folder is the folder that we're going to use to store our configuration code that's going to get Explore California into the…
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
-
-
-
-
-
-
-
-
(Locked)
Deploy with confidence with infrastructure as code3m 45s
-
(Locked)
Finding the version of OpenTofu to use49s
-
(Locked)
Adding OpenTofu to Docker Compose4m 49s
-
(Locked)
AWS deployment explained2m 13s
-
(Locked)
Writing your integration test12m 18s
-
(Locked)
Writing OpenTofu code9m 43s
-
(Locked)
Reviewing the OpenTofu plan3m 24s
-
Applying the OpenTofu plan8m 11s
-
(Locked)
Running your integration test1m 42s
-
(Locked)
Destroying the website from AWS S31m 53s
-
(Locked)
-
-