diff --git a/brother-printer-webhook.tf b/_disabled/brother-printer-webhook.tf similarity index 100% rename from brother-printer-webhook.tf rename to _disabled/brother-printer-webhook.tf diff --git a/_disabled/tdarr.tf b/_disabled/tdarr.tf new file mode 100644 index 0000000..8edf30a --- /dev/null +++ b/_disabled/tdarr.tf @@ -0,0 +1,58 @@ +data "docker_registry_image" "tdarr" { + name = "tdarr/tdarr:latest" +} + +resource "docker_image" "tdarr" { + name = data.docker_registry_image.tdarr.name + pull_triggers = [data.docker_registry_image.tdarr.sha256_digest] +} + +resource "docker_container" "tdarr" { + image = docker_image.tdarr.image_id + name = "tdarr" + restart = "always" + + log_driver = "local" + + env = [ + "PUID=444", + "PGID=321", + "UMASK=002" + ] + + networks_advanced { + name = docker_network.bridge.name + ipv4_address = "192.168.2.134" + } + + mounts { + target = "/config" + source = "/share/appdata/tdarr/config" + type = "bind" + } + + mounts { + target = "/cache" + source = "/share/appdata/tdarr/cache" + type = "bind" + } + + # https://wiki.servarr.com/docker-guide#Consistent_and_well_planned_paths + volumes { + container_path = "/datarr" + volume_name = "truenas-arr" + } + + devices { + host_path = "/dev/dri/renderD128" + container_path = "/dev/dri/renderD128" + permissions = "rwm" + } + + lifecycle { + ignore_changes = [ + ulimit, + log_opts + ] + } +} diff --git a/mariadb.tf b/mariadb.tf index 62621ae..0e9b867 100644 --- a/mariadb.tf +++ b/mariadb.tf @@ -1,5 +1,5 @@ data "docker_registry_image" "mariadb" { - name = "mariadb:10.11" + name = "mariadb:11.4" } resource "docker_image" "mariadb" { diff --git a/terraform.tfstate b/terraform.tfstate index 0f80359..ff2071d 100644 --- a/terraform.tfstate +++ b/terraform.tfstate @@ -1,7 +1,7 @@ { "version": 4, "terraform_version": "1.5.5", - "serial": 4780, + "serial": 4787, "lineage": "fcc74498-a461-682e-d8e4-5bc8c6ea51ec", "outputs": {}, "resources": [ @@ -95,24 +95,6 @@ } ] }, - { - "mode": "data", - "type": "docker_registry_image", - "name": "brother-printer-webhook", - "provider": "provider[\"registry.terraform.io/kreuzwerker/docker\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "id": "sha256:d4f7faf587159c4bbb428b140f20967af34a0056bbbceb11ad98d7a80554a7e2", - "insecure_skip_verify": false, - "name": "gitea.rescla.me/rescla/brother-printer-webhook:latest", - "sha256_digest": "sha256:d4f7faf587159c4bbb428b140f20967af34a0056bbbceb11ad98d7a80554a7e2" - }, - "sensitive_attributes": [] - } - ] - }, { "mode": "data", "type": "docker_registry_image", @@ -374,10 +356,10 @@ { "schema_version": 0, "attributes": { - "id": "sha256:3958f2df725a9ebdabd0ae6a0c0a841da8e45194b36a33d8bd83abb7dd6c034a", + "id": "sha256:5dfb3093333fa0ea53194ddef0a2bfa21d3b1e1353bd228b22610cd6fc0c04da", "insecure_skip_verify": false, - "name": "mariadb:10.11", - "sha256_digest": "sha256:3958f2df725a9ebdabd0ae6a0c0a841da8e45194b36a33d8bd83abb7dd6c034a" + "name": "mariadb:11.4", + "sha256_digest": "sha256:5dfb3093333fa0ea53194ddef0a2bfa21d3b1e1353bd228b22610cd6fc0c04da" }, "sensitive_attributes": [] } @@ -781,9 +763,9 @@ "cpu_shares": 0, "destroy_grace_seconds": null, "devices": [], - "dns": null, - "dns_opts": null, - "dns_search": null, + "dns": [], + "dns_opts": [], + "dns_search": [], "domainname": "", "entrypoint": [ "entry.sh" @@ -795,7 +777,7 @@ ], "exit_code": null, "gpus": null, - "group_add": null, + "group_add": [], "healthcheck": [ { "interval": "15s", @@ -827,7 +809,7 @@ "mounts": [ { "bind_options": [], - "read_only": null, + "read_only": false, "source": "/share/appdata/airsonic/data", "target": "/var/airsonic", "tmpfs_options": [], @@ -836,7 +818,7 @@ }, { "bind_options": [], - "read_only": null, + "read_only": false, "source": "/share/appdata/airsonic/music", "target": "/var/music", "tmpfs_options": [], @@ -845,7 +827,7 @@ }, { "bind_options": [], - "read_only": null, + "read_only": false, "source": "/share/appdata/airsonic/playlists", "target": "/var/playlists", "tmpfs_options": [], @@ -854,7 +836,7 @@ }, { "bind_options": [], - "read_only": null, + "read_only": false, "source": "/share/appdata/airsonic/podcasts", "target": "/var/podcasts", "tmpfs_options": [], @@ -916,11 +898,17 @@ "stdin_open": false, "stop_signal": "", "stop_timeout": 0, - "storage_opts": null, - "sysctls": null, - "tmpfs": null, + "storage_opts": {}, + "sysctls": {}, + "tmpfs": {}, "tty": false, - "ulimit": [], + "ulimit": [ + { + "hard": 65535, + "name": "nofile", + "soft": 65535 + } + ], "upload": [], "user": "0:0", "userns_mode": "", @@ -929,7 +917,7 @@ "container_path": "/data", "from_container": "", "host_path": "", - "read_only": null, + "read_only": false, "volume_name": "truenas-arr" } ], @@ -940,8 +928,11 @@ "sensitive_attributes": [], "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", "dependencies": [ + "data.docker_registry_image.airsonic", + "data.docker_registry_image.mariadb", "docker_container.mariadb", "docker_image.airsonic", + "docker_image.mariadb", "docker_network.bridge", "docker_network.mariadb" ] @@ -1503,126 +1494,6 @@ } ] }, - { - "mode": "managed", - "type": "docker_container", - "name": "brother-printer-webhook", - "provider": "provider[\"registry.terraform.io/kreuzwerker/docker\"]", - "instances": [ - { - "schema_version": 2, - "attributes": { - "attach": false, - "bridge": "", - "capabilities": [], - "cgroupns_mode": null, - "command": [ - "npm", - "run", - "serve" - ], - "container_logs": null, - "container_read_refresh_timeout_milliseconds": 15000, - "cpu_set": "", - "cpu_shares": 0, - "destroy_grace_seconds": null, - "devices": [], - "dns": [], - "dns_opts": [], - "dns_search": [], - "domainname": "", - "entrypoint": [ - "docker-entrypoint.sh" - ], - "env": [], - "exit_code": null, - "gpus": null, - "group_add": [], - "healthcheck": [], - "host": [], - "hostname": "brother-printer-webhook", - "id": "00cf5838b5e59002dc35d921e8f98b4342db3865ea2859cfeba0a4e0a369eca7", - "image": "sha256:395ae3c99afd8169a64aa28d378feebb55009334cc383d1864be8771c35d0ebd", - "init": false, - "ipc_mode": "private", - "labels": [], - "log_driver": "json-file", - "log_opts": { - "max-file": "10", - "max-size": "10m" - }, - "logs": false, - "max_retry_count": 0, - "memory": 0, - "memory_swap": 0, - "mounts": [], - "must_run": true, - "name": "brother-printer-webhook", - "network_data": [ - { - "gateway": "172.29.36.1", - "global_ipv6_address": "", - "global_ipv6_prefix_length": 0, - "ip_address": "172.29.36.3", - "ip_prefix_length": 22, - "ipv6_gateway": "", - "mac_address": "02:42:ac:1d:24:03", - "network_name": "grocy" - } - ], - "network_mode": "default", - "networks_advanced": [ - { - "aliases": [], - "ipv4_address": "", - "ipv6_address": "", - "name": "grocy" - } - ], - "pid_mode": "", - "ports": [], - "privileged": false, - "publish_all_ports": false, - "read_only": false, - "remove_volumes": true, - "restart": "always", - "rm": false, - "runtime": "runc", - "security_opts": [], - "shm_size": 64, - "start": true, - "stdin_open": false, - "stop_signal": "", - "stop_timeout": 0, - "storage_opts": {}, - "sysctls": {}, - "tmpfs": {}, - "tty": false, - "ulimit": [ - { - "hard": 65535, - "name": "nofile", - "soft": 65535 - } - ], - "upload": [], - "user": "", - "userns_mode": "", - "volumes": [], - "wait": false, - "wait_timeout": 60, - "working_dir": "/app" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", - "dependencies": [ - "data.docker_registry_image.brother-printer-webhook", - "docker_image.brother-printer-webhook", - "docker_network.grocy" - ] - } - ] - }, { "mode": "managed", "type": "docker_container", @@ -3589,9 +3460,9 @@ "cpu_shares": 0, "destroy_grace_seconds": null, "devices": [], - "dns": [], - "dns_opts": [], - "dns_search": [], + "dns": null, + "dns_opts": null, + "dns_search": null, "domainname": "", "entrypoint": [ "docker-entrypoint.sh" @@ -3601,12 +3472,12 @@ ], "exit_code": null, "gpus": null, - "group_add": [], - "healthcheck": [], + "group_add": null, + "healthcheck": null, "host": [], - "hostname": "52f166f7f498", - "id": "52f166f7f49837e208f7244f3d7ad5dfc52385d49132ee4a7edc5f3a49b922bc", - "image": "sha256:4254659f2379f8e1f62a81267c3ab59dfdb2460d0659d18da189f46264b9a2c1", + "hostname": "a1f688950419", + "id": "a1f688950419d7c40becf401bce75a98bc6dec58898a748ce40914b9eb4c2960", + "image": "sha256:d5bedc5cb9292f8b3b97b8325ae671d63b9ff4e5c4216affbbdb04da552791b7", "init": false, "ipc_mode": "private", "labels": [], @@ -3622,7 +3493,7 @@ "mounts": [ { "bind_options": [], - "read_only": false, + "read_only": null, "source": "/share/appdata/mariadb", "target": "/var/lib/mysql", "tmpfs_options": [], @@ -3650,7 +3521,7 @@ "ip_address": "192.168.2.127", "ip_prefix_length": 24, "ipv6_gateway": "", - "mac_address": "02:42:d5:f9:ea:da", + "mac_address": "02:42:be:0c:47:a8", "network_name": "qnet-static-eth0-48e715" } ], @@ -3684,17 +3555,11 @@ "stdin_open": false, "stop_signal": "", "stop_timeout": 0, - "storage_opts": {}, - "sysctls": {}, - "tmpfs": {}, + "storage_opts": null, + "sysctls": null, + "tmpfs": null, "tty": false, - "ulimit": [ - { - "hard": 65535, - "name": "nofile", - "soft": 65535 - } - ], + "ulimit": [], "upload": [], "user": "", "userns_mode": "", @@ -4165,9 +4030,9 @@ "cpu_shares": 0, "destroy_grace_seconds": null, "devices": [], - "dns": [], - "dns_opts": [], - "dns_search": [], + "dns": null, + "dns_opts": null, + "dns_search": null, "domainname": "", "entrypoint": [ "/init" @@ -4187,11 +4052,11 @@ ], "exit_code": null, "gpus": null, - "group_add": [], - "healthcheck": [], + "group_add": null, + "healthcheck": null, "host": [], - "hostname": "3930e8fad044", - "id": "3930e8fad044327b5c3f6532c4703e347c468bbfca14ddf6f65831efbceddc62", + "hostname": "c4c7e221e75a", + "id": "c4c7e221e75a3d60b183955a9a4563737f453c6ebcbbcea613e474eb8550c791", "image": "sha256:6f44ed322e7f952a0ef3be354f45e48d79c1f4ede54d38da1f785bbbc7ec3899", "init": false, "ipc_mode": "private", @@ -4226,7 +4091,7 @@ "ip_address": "192.168.2.116", "ip_prefix_length": 24, "ipv6_gateway": "", - "mac_address": "02:42:e2:4d:c0:78", + "mac_address": "02:42:47:09:a6:ef", "network_name": "qnet-static-eth0-48e715" } ], @@ -4260,17 +4125,11 @@ "stdin_open": false, "stop_signal": "", "stop_timeout": 0, - "storage_opts": {}, - "sysctls": {}, - "tmpfs": {}, + "storage_opts": null, + "sysctls": null, + "tmpfs": null, "tty": false, - "ulimit": [ - { - "hard": 65535, - "name": "nofile", - "soft": 65535 - } - ], + "ulimit": [], "upload": [], "user": "", "userns_mode": "", @@ -4279,21 +4138,21 @@ "container_path": "/photoprism/import", "from_container": "", "host_path": "", - "read_only": false, + "read_only": null, "volume_name": "truenas-photoprism-import" }, { "container_path": "/photoprism/originals", "from_container": "", "host_path": "", - "read_only": false, + "read_only": null, "volume_name": "truenas-photoprism-originals" }, { "container_path": "/photoprism/storage", "from_container": "", "host_path": "", - "read_only": false, + "read_only": null, "volume_name": "truenas-photoprism-data" } ], @@ -4304,7 +4163,6 @@ "sensitive_attributes": [], "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", "dependencies": [ - "data.docker_registry_image.photoprism", "docker_image.photoprism", "docker_network.bridge", "docker_network.mariadb", @@ -7068,36 +6926,6 @@ } ] }, - { - "mode": "managed", - "type": "docker_image", - "name": "brother-printer-webhook", - "provider": "provider[\"registry.terraform.io/kreuzwerker/docker\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "build": [], - "force_remove": null, - "id": "sha256:395ae3c99afd8169a64aa28d378feebb55009334cc383d1864be8771c35d0ebdgitea.rescla.me/rescla/brother-printer-webhook:latest", - "image_id": "sha256:395ae3c99afd8169a64aa28d378feebb55009334cc383d1864be8771c35d0ebd", - "keep_locally": null, - "name": "gitea.rescla.me/rescla/brother-printer-webhook:latest", - "platform": null, - "pull_triggers": [ - "sha256:d4f7faf587159c4bbb428b140f20967af34a0056bbbceb11ad98d7a80554a7e2" - ], - "repo_digest": "gitea.rescla.me/rescla/brother-printer-webhook@sha256:d4f7faf587159c4bbb428b140f20967af34a0056bbbceb11ad98d7a80554a7e2", - "triggers": null - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "data.docker_registry_image.brother-printer-webhook" - ] - } - ] - }, { "mode": "managed", "type": "docker_image", @@ -7529,15 +7357,15 @@ "attributes": { "build": [], "force_remove": null, - "id": "sha256:4254659f2379f8e1f62a81267c3ab59dfdb2460d0659d18da189f46264b9a2c1mariadb:10.11", - "image_id": "sha256:4254659f2379f8e1f62a81267c3ab59dfdb2460d0659d18da189f46264b9a2c1", + "id": "sha256:d5bedc5cb9292f8b3b97b8325ae671d63b9ff4e5c4216affbbdb04da552791b7mariadb:11.4", + "image_id": "sha256:d5bedc5cb9292f8b3b97b8325ae671d63b9ff4e5c4216affbbdb04da552791b7", "keep_locally": null, - "name": "mariadb:10.11", + "name": "mariadb:11.4", "platform": null, "pull_triggers": [ - "sha256:3958f2df725a9ebdabd0ae6a0c0a841da8e45194b36a33d8bd83abb7dd6c034a" + "sha256:5dfb3093333fa0ea53194ddef0a2bfa21d3b1e1353bd228b22610cd6fc0c04da" ], - "repo_digest": "mariadb@sha256:3958f2df725a9ebdabd0ae6a0c0a841da8e45194b36a33d8bd83abb7dd6c034a", + "repo_digest": "mariadb@sha256:5dfb3093333fa0ea53194ddef0a2bfa21d3b1e1353bd228b22610cd6fc0c04da", "triggers": null }, "sensitive_attributes": [], diff --git a/terraform.tfstate.backup b/terraform.tfstate.backup index 6bd114f..0f80359 100644 --- a/terraform.tfstate.backup +++ b/terraform.tfstate.backup @@ -1,7 +1,7 @@ { "version": 4, "terraform_version": "1.5.5", - "serial": 4777, + "serial": 4780, "lineage": "fcc74498-a461-682e-d8e4-5bc8c6ea51ec", "outputs": {}, "resources": [ @@ -781,9 +781,9 @@ "cpu_shares": 0, "destroy_grace_seconds": null, "devices": [], - "dns": [], - "dns_opts": [], - "dns_search": [], + "dns": null, + "dns_opts": null, + "dns_search": null, "domainname": "", "entrypoint": [ "entry.sh" @@ -795,7 +795,7 @@ ], "exit_code": null, "gpus": null, - "group_add": [], + "group_add": null, "healthcheck": [ { "interval": "15s", @@ -809,8 +809,8 @@ } ], "host": [], - "hostname": "ee0eccb3e84d", - "id": "ee0eccb3e84ddc917acf29535870ba1586c82c0913700efef6b370b0047e0414", + "hostname": "d7406d919476", + "id": "d7406d919476cd61ee01a68cecff9f6ce788fab9bcc0f3f62a509411293b5808", "image": "sha256:b2b95105cdb73911ee4cf4ed7bd9ffd13229056a612d6fdbeae19ed7cc6808ab", "init": false, "ipc_mode": "private", @@ -827,7 +827,7 @@ "mounts": [ { "bind_options": [], - "read_only": false, + "read_only": null, "source": "/share/appdata/airsonic/data", "target": "/var/airsonic", "tmpfs_options": [], @@ -836,7 +836,7 @@ }, { "bind_options": [], - "read_only": false, + "read_only": null, "source": "/share/appdata/airsonic/music", "target": "/var/music", "tmpfs_options": [], @@ -845,7 +845,7 @@ }, { "bind_options": [], - "read_only": false, + "read_only": null, "source": "/share/appdata/airsonic/playlists", "target": "/var/playlists", "tmpfs_options": [], @@ -854,7 +854,7 @@ }, { "bind_options": [], - "read_only": false, + "read_only": null, "source": "/share/appdata/airsonic/podcasts", "target": "/var/podcasts", "tmpfs_options": [], @@ -882,7 +882,7 @@ "ip_address": "192.168.2.83", "ip_prefix_length": 24, "ipv6_gateway": "", - "mac_address": "02:42:2f:cd:93:b6", + "mac_address": "02:42:8a:ef:13:57", "network_name": "qnet-static-eth0-48e715" } ], @@ -916,21 +916,23 @@ "stdin_open": false, "stop_signal": "", "stop_timeout": 0, - "storage_opts": {}, - "sysctls": {}, - "tmpfs": {}, + "storage_opts": null, + "sysctls": null, + "tmpfs": null, "tty": false, - "ulimit": [ - { - "hard": 65535, - "name": "nofile", - "soft": 65535 - } - ], + "ulimit": [], "upload": [], "user": "0:0", "userns_mode": "", - "volumes": [], + "volumes": [ + { + "container_path": "/data", + "from_container": "", + "host_path": "", + "read_only": null, + "volume_name": "truenas-arr" + } + ], "wait": false, "wait_timeout": 60, "working_dir": "/var" @@ -938,11 +940,8 @@ "sensitive_attributes": [], "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", "dependencies": [ - "data.docker_registry_image.airsonic", - "data.docker_registry_image.mariadb", "docker_container.mariadb", "docker_image.airsonic", - "docker_image.mariadb", "docker_network.bridge", "docker_network.mariadb" ] @@ -3453,9 +3452,9 @@ "cpu_shares": 0, "destroy_grace_seconds": null, "devices": [], - "dns": null, - "dns_opts": null, - "dns_search": null, + "dns": [], + "dns_opts": [], + "dns_search": [], "domainname": "", "entrypoint": [ "/init" @@ -3467,8 +3466,8 @@ ], "exit_code": null, "gpus": null, - "group_add": null, - "healthcheck": null, + "group_add": [], + "healthcheck": [], "host": [], "hostname": "daddff4ff9b7", "id": "daddff4ff9b741ab69851e855da5f526d3b9ddc4136436f2494b18491af571ed", @@ -3477,7 +3476,7 @@ "ipc_mode": "private", "labels": [], "log_driver": "local", - "log_opts": null, + "log_opts": {}, "logs": false, "max_retry_count": 0, "memory": 0, @@ -3485,7 +3484,7 @@ "mounts": [ { "bind_options": [], - "read_only": null, + "read_only": false, "source": "/share/appdata/lidarr", "target": "/config", "tmpfs_options": [], @@ -3531,11 +3530,17 @@ "stdin_open": false, "stop_signal": "", "stop_timeout": 0, - "storage_opts": null, - "sysctls": null, - "tmpfs": null, + "storage_opts": {}, + "sysctls": {}, + "tmpfs": {}, "tty": false, - "ulimit": [], + "ulimit": [ + { + "hard": 65535, + "name": "nofile", + "soft": 65535 + } + ], "upload": [], "user": "", "userns_mode": "", @@ -3544,7 +3549,7 @@ "container_path": "/data", "from_container": "", "host_path": "", - "read_only": null, + "read_only": false, "volume_name": "truenas-arr" } ], @@ -3555,6 +3560,7 @@ "sensitive_attributes": [], "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", "dependencies": [ + "data.docker_registry_image.lidarr", "docker_image.lidarr", "docker_network.bridge" ] @@ -3808,7 +3814,7 @@ "ip_address": "192.168.2.115", "ip_prefix_length": 24, "ipv6_gateway": "", - "mac_address": "02:42:60:e0:32:bf", + "mac_address": "02:42:29:87:cf:c7", "network_name": "qnet-static-eth0-48e715" } ], @@ -4203,16 +4209,6 @@ "must_run": true, "name": "photoprism", "network_data": [ - { - "gateway": "192.168.2.1", - "global_ipv6_address": "", - "global_ipv6_prefix_length": 0, - "ip_address": "192.168.2.116", - "ip_prefix_length": 24, - "ipv6_gateway": "", - "mac_address": "02:42:e2:4d:c0:78", - "network_name": "qnet-static-eth0-48e715" - }, { "gateway": "172.29.0.1", "global_ipv6_address": "", @@ -4222,6 +4218,16 @@ "ipv6_gateway": "", "mac_address": "02:42:ac:1d:00:03", "network_name": "mariadb" + }, + { + "gateway": "192.168.2.1", + "global_ipv6_address": "", + "global_ipv6_prefix_length": 0, + "ip_address": "192.168.2.116", + "ip_prefix_length": 24, + "ipv6_gateway": "", + "mac_address": "02:42:e2:4d:c0:78", + "network_name": "qnet-static-eth0-48e715" } ], "network_mode": "default",