Skip to content

Commit 7723c26

Browse files
committed
tf: Modify compose/.env file for repeat docker-compose runs
Later/manual runs of docker-compose will do the wrong thing without this because the env settings won't be populated for those runs. This fixes that error by first modifying the .env file which docker-compose will use. Signed-off-by: Manuel Mendez <[email protected]>
1 parent 2276a29 commit 7723c26

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

deploy/terraform/main.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,11 @@ resource "null_resource" "setup" {
101101

102102
provisioner "remote-exec" {
103103
inline = [
104-
"cd /root && tar zxvf /root/compose.tar.gz -C /root/sandbox",
105-
"cd /root/sandbox/compose && TINKERBELL_CLIENT_MAC=${local.worker_macs[0]} TINKERBELL_TEMPLATE_MANIFEST=/manifests/template/ubuntu-equinix-metal.yaml TINKERBELL_HARDWARE_MANIFEST=/manifests/hardware/hardware-equinix-metal.json docker-compose up -d",
104+
"tar -vxz -f /root/compose.tar.gz -C /root/sandbox",
105+
"echo TINKERBELL_CLIENT_MAC=${local.worker_macs[0]} >>/root/sandbox/compose/.env",
106+
"echo TINKERBELL_TEMPLATE_MANIFEST=/manifests/template/ubuntu-equinix-metal.yaml >>/root/sandbox/compose/.env",
107+
"echo TINKERBELL_HARDWARE_MANIFEST=/manifests/hardware/hardware-equinix-metal.json >>/root/sandbox/compose/.env",
108+
"docker-compose -f /root/sandbox/compose/docker-compose.yml up -d"
106109
]
107110
}
108111
}

0 commit comments

Comments
 (0)