This commit is contained in:
Marc Fokkert
2025-05-27 08:14:30 +02:00
parent 0f4ba8da39
commit 82fb383c2e
5 changed files with 55 additions and 17 deletions

View File

@@ -0,0 +1,36 @@
data "docker_registry_image" "haproxy" {
name = "haproxy:latest"
}
resource "docker_image" "haproxy" {
name = data.docker_registry_image.haproxy.name
pull_triggers = [data.docker_registry_image.haproxy.sha256_digest]
}
resource "docker_container" "haproxy" {
image = docker_image.haproxy.image_id
name = "haproxy"
restart = "always"
mounts {
target = "/usr/local/etc/haproxy/haproxy.cfg"
source = "/mnt/appdata/haproxy/haproxy.cfg"
type = "bind"
}
networks_advanced {
name = docker_network.container-public.name
ipv4_address = "192.168.3.19"
}
networks_advanced {
name = docker_network.ip6net.name
}
lifecycle {
ignore_changes = [
ulimit,
log_opts
]
}
}

View File

@@ -24,7 +24,6 @@ resource "docker_container" "dozzle" {
ipv4_address = "192.168.3.10"
}
lifecycle {
ignore_changes = [
ulimit,

View File

@@ -28,20 +28,23 @@ resource "docker_network" "container-public" {
}
}
# resource "docker_network" "ipv6-slaac" {
# name = "ipv6-slaac"
# ipv6 = true
#
# ipam_config {
# aux_address = {}
# subnet = "2a02:a470:b12a:2::/64"
# }
#
# ipam_config {
# gateway = "192.168.32.1"
# subnet = "192.168.32.0/20"
# }
# }
resource "docker_network" "ipv6-slaac" {
name = "ipv6-slaac"
ipv6 = true
ipam_config {
subnet = "2a02:a470:b12a:2::/64"
}
}
resource "docker_network" "ip6net" {
name = "ipv6net"
ipv6 = true
ipam_config {
subnet = "2001:db8::/64"
}
}
resource "docker_volume" "truenas-photoprism-originals" {
name = "truenas-photoprism-originals"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long