Updates
This commit is contained in:
49
core-os-podman/prometheus.tf
Normal file
49
core-os-podman/prometheus.tf
Normal file
@@ -0,0 +1,49 @@
|
||||
data "docker_registry_image" "prometheus" {
|
||||
name = "prom/prometheus:latest"
|
||||
}
|
||||
|
||||
resource "docker_image" "prometheus" {
|
||||
name = data.docker_registry_image.prometheus.name
|
||||
pull_triggers = [data.docker_registry_image.prometheus.sha256_digest]
|
||||
}
|
||||
|
||||
resource "docker_container" "prometheus" {
|
||||
image = docker_image.prometheus.image_id
|
||||
name = "prometheus"
|
||||
|
||||
command = [
|
||||
"--config.file=/etc/prometheus/prometheus.yml",
|
||||
"--storage.tsdb.path=/prometheus",
|
||||
"--web.console.libraries=/usr/share/prometheus/console_libraries",
|
||||
"--web.console.templates=/usr/share/prometheus/consoles",
|
||||
"--storage.tsdb.retention.time=5y"
|
||||
]
|
||||
|
||||
user = "1000:1000"
|
||||
|
||||
mounts {
|
||||
target = "/etc/prometheus/prometheus.yml"
|
||||
source = "/var/lib/containers/prometheus/config/prometheus.yml"
|
||||
type = "bind"
|
||||
}
|
||||
|
||||
mounts {
|
||||
target = "/prometheus"
|
||||
source = "/var/lib/containers/prometheus/data"
|
||||
type = "bind"
|
||||
}
|
||||
|
||||
restart = "always"
|
||||
|
||||
networks_advanced {
|
||||
name = docker_network.container-public.name
|
||||
ipv4_address = "192.168.3.42"
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [
|
||||
ulimit,
|
||||
log_opts
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user