hassio back
This commit is contained in:
60
apps/homeassistant/live.hcl
Normal file
60
apps/homeassistant/live.hcl
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
job "homeassistant" {
|
||||||
|
datacenters = [
|
||||||
|
"nummer5",
|
||||||
|
]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "apps" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
network {
|
||||||
|
mode = "host"
|
||||||
|
port "http" {
|
||||||
|
to = 8123
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "homeassistant"
|
||||||
|
port = "http"
|
||||||
|
|
||||||
|
tags = [
|
||||||
|
"traefik.enable=true",
|
||||||
|
"traefik.http.routers.hassio.rule=Host(`hassio.service.consul`)",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
volume "homeassistant-data" {
|
||||||
|
type = "csi"
|
||||||
|
source = "homeassistant-data"
|
||||||
|
read_only = false
|
||||||
|
access_mode = "single-node-writer"
|
||||||
|
attachment_mode = "file-system"
|
||||||
|
}
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 5
|
||||||
|
delay = "30s"
|
||||||
|
}
|
||||||
|
|
||||||
|
task "homeassistant" {
|
||||||
|
driver = "podman"
|
||||||
|
volume_mount {
|
||||||
|
volume = "homeassistant-data"
|
||||||
|
destination = "/config"
|
||||||
|
read_only = false
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "docker.io/homeassistant/home-assistant:latest"
|
||||||
|
ports = ["http"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 200
|
||||||
|
memory = 256
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
20
apps/homeassistant/volume.hcl
Normal file
20
apps/homeassistant/volume.hcl
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
type = "csi"
|
||||||
|
id = "homeassistant-data"
|
||||||
|
name = "homeassistant-data"
|
||||||
|
plugin_id = "nfs"
|
||||||
|
|
||||||
|
capability {
|
||||||
|
access_mode = "single-node-writer"
|
||||||
|
attachment_mode = "file-system"
|
||||||
|
}
|
||||||
|
|
||||||
|
context {
|
||||||
|
server = "ebin01.wks"
|
||||||
|
share = "/data/raid1-ssd/app-data/homeassistant-data"
|
||||||
|
mountPermissions = "0"
|
||||||
|
}
|
||||||
|
|
||||||
|
mount_options {
|
||||||
|
fs_type = "nfs"
|
||||||
|
mount_flags = [ "timeo=30", "vers=3", "_netdev" , "nolock" ]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user