This commit is contained in:
Marc Fokkert
2025-09-02 10:04:07 +02:00
parent ef08e991f2
commit c1bc782361
4 changed files with 21 additions and 11 deletions

View File

@@ -13,15 +13,17 @@ resource "docker_container" "grafana" {
restart = "always"
user = "1000:1000"
mounts {
target = "/var/lib/grafana"
source = "/share/appdata/grafana"
source = "/var/lib/containers/grafana"
type = "bind"
}
networks_advanced {
name = docker_network.bridge.name
ipv4_address = "192.168.2.79"
name = docker_network.container-public.name
ipv4_address = "192.168.3.41"
}
lifecycle {

View File

@@ -11,25 +11,33 @@ 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=2y"]
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"
source = "/share/appdata/prometheus/config"
target = "/etc/prometheus/prometheus.yml"
source = "/var/lib/containers/prometheus/config/prometheus.yml"
type = "bind"
}
mounts {
target = "/prometheus"
source = "/share/appdata/prometheus/data"
source = "/var/lib/containers/prometheus/data"
type = "bind"
}
restart = "always"
networks_advanced {
name = docker_network.bridge.name
ipv4_address = "192.168.2.80"
name = docker_network.container-public.name
ipv4_address = "192.168.3.42"
}
lifecycle {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long