Compare commits

...

2 Commits

Author SHA1 Message Date
Marc Fokkert
e5ce28f918 Updates 2025-05-27 08:36:22 +02:00
Marc Fokkert
82fb383c2e Temp 2025-05-27 08:14:30 +02:00
7 changed files with 73 additions and 19 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" ipv4_address = "192.168.3.10"
} }
lifecycle { lifecycle {
ignore_changes = [ ignore_changes = [
ulimit, ulimit,

View File

@@ -28,20 +28,39 @@ resource "docker_network" "container-public" {
} }
} }
# resource "docker_network" "ipv6-slaac" { resource "docker_network" "ipv6-slaac" {
# name = "ipv6-slaac" name = "ipv6-slaac"
# ipv6 = true ipv6 = true
#
# ipam_config { ipam_config {
# aux_address = {} aux_address = {}
# subnet = "2a02:a470:b12a:2::/64" gateway = "192.168.48.1"
# } subnet = "192.168.48.0/20"
# }
# ipam_config {
# gateway = "192.168.32.1" ipam_config {
# subnet = "192.168.32.0/20" aux_address = {}
# } subnet = "2a02:a470:b12a:2::/64"
# } gateway = "2a02:a470:b12a:2::1"
}
}
resource "docker_network" "ip6net" {
name = "ipv6net"
ipv6 = true
ipam_config {
aux_address = {}
gateway = "192.168.64.1"
subnet = "192.168.64.0/20"
}
ipam_config {
aux_address = {}
subnet = "2001:db8::/64"
gateway = "2001:db8::1"
}
}
resource "docker_volume" "truenas-photoprism-originals" { resource "docker_volume" "truenas-photoprism-originals" {
name = "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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long