Adds home-assistant

Trying to run https://hackaday.com/2021/07/24/esp8266-adds-wifi-logging-to-ikeas-air-quality-sensor/
This commit is contained in:
Nemo 2023-08-03 17:00:18 +05:30
parent 1feaf2e4f6
commit e18d8b11b1
4 changed files with 35 additions and 0 deletions

24
home-assistant/main.tf Normal file
View File

@ -0,0 +1,24 @@
module "home-assistant" {
name = "home-assistant"
source = "../modules/container"
image = "ghcr.io/home-assistant/home-assistant:stable"
resource = {
memory = 1024
memory_swap = 1024
}
env = [
"TZ=Asia/Kolkata",
]
network_mode = "host"
volumes = [
{
container_path = "/config"
host_path = "/mnt/zwing/config/home-assistant"
},
]
}

View File

@ -91,6 +91,10 @@ module "digitalocean" {
source = "./digitalocean"
}
module "home-assistant" {
source = "./home-assistant"
}
module "mastodon" {
source = "./mastodon"
db-password = data.pass_password.mastodon-db-password.password

View File

@ -17,6 +17,8 @@ resource "docker_container" "container" {
entrypoint = var.entrypoint
user = var.user
privileged = var.privileged
network_mode = var.network_mode
gpus = var.gpu ? "all" : ""

View File

@ -102,6 +102,11 @@ variable "volumes" {
default = {}
}
variable "privileged" {
description = " If true, the container runs in privileged mode."
default = false
}
variable "capabilities" {
description = "capabilities"