-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
34 lines (28 loc) · 925 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
resource "ssh_resource" "default_server" {
host = var.public_ip
connection {
host = var.public_ip
user = var.ssh_username
private_key = file(var.ssh_private_key)
agent = false
}
provisioner "remote-exec" {
inline = concat(
[for item in var.repositories :
"echo ${item.name}; cd ${var.server_root}; git clone ${item.url}; cd ${var.server_root}/${item.name}; ${item.command}"
]
)
}
provisioner "file" {
source = "./config/core/docker-compose.production.yml"
destination = "/root/Kavka-Core/docker-compose.yml"
}
provisioner "file" {
source = "./config/core/config.production.yaml"
destination = "/root/Kavka-Core/config/config.production.yaml"
}
provisioner "file" {
source = "./config/web/environment.production.ts"
destination = "/root/Kavka-Web/src/environments/environment.production.ts"
}
}