2018-04-22 12:39:44 +00:00
|
|
|
resource "docker_container" "prometheus" {
|
2018-02-09 20:56:31 +00:00
|
|
|
name = "prometheus"
|
2021-10-15 12:54:13 +00:00
|
|
|
image = docker_image.prometheus.latest
|
2018-02-09 20:56:31 +00:00
|
|
|
|
|
|
|
# prometheus:prometheus
|
|
|
|
user = "985:983"
|
|
|
|
|
|
|
|
ports {
|
|
|
|
internal = 9090
|
2018-07-08 19:41:18 +00:00
|
|
|
external = 8811
|
2021-10-15 12:54:13 +00:00
|
|
|
ip = var.ips["eth0"]
|
2018-02-09 20:56:31 +00:00
|
|
|
}
|
|
|
|
|
2018-04-05 09:16:40 +00:00
|
|
|
ports {
|
|
|
|
internal = 9090
|
2018-07-08 19:41:18 +00:00
|
|
|
external = 8811
|
2021-10-15 12:54:13 +00:00
|
|
|
ip = var.ips["tun0"]
|
2018-04-05 09:16:40 +00:00
|
|
|
}
|
|
|
|
|
2018-02-09 20:56:31 +00:00
|
|
|
command = ["--config.file=/etc/prometheus/prometheus.yml"]
|
|
|
|
|
|
|
|
volumes {
|
|
|
|
host_path = "/mnt/xwing/data/prometheus"
|
|
|
|
container_path = "/prometheus"
|
|
|
|
}
|
|
|
|
|
|
|
|
upload {
|
2021-10-15 12:54:13 +00:00
|
|
|
content = file("${path.module}/config/prometheus.yml")
|
2018-02-09 20:56:31 +00:00
|
|
|
file = "/etc/prometheus/prometheus.yml"
|
|
|
|
}
|
|
|
|
|
2021-10-15 12:54:13 +00:00
|
|
|
networks = ["monitoring", "bridge"]
|
2018-02-09 20:56:31 +00:00
|
|
|
|
|
|
|
restart = "unless-stopped"
|
|
|
|
destroy_grace_seconds = 10
|
|
|
|
must_run = true
|
|
|
|
}
|
2019-01-19 22:16:18 +00:00
|
|
|
|
|
|
|
data "docker_network" "bridge" {
|
|
|
|
name = "bridge"
|
|
|
|
}
|
2021-10-15 12:54:13 +00:00
|
|
|
|