diff --git a/homeassistant/service-homeassistant.json b/homeassistant/service-homeassistant.json index c2c5336..f1cea85 100644 --- a/homeassistant/service-homeassistant.json +++ b/homeassistant/service-homeassistant.json @@ -4,6 +4,27 @@ "DOMAIN": "DOMAIN" }, "containers": [ + { + "IMAGE": "alpine:latest", + "UPDATE": "true", + "NAME": "homeassistant-init", + "NETWORK": "host", + "MEMORY": "64M", + "VOLUMES": [ + { + "SOURCE": "USER_DATA", + "DEST": "/etc/user/data", + "TYPE": "rw" + } + ], + "EXTRA": "--rm", + "DEPEND": "null", + "START_ON_BOOT": "false", + "ENTRYPOINT": "sh -c", + "CMD": "mkdir -p /etc/user/data/homeassistant/config", + "PRE_START": "null", + "POST_START": "null" + }, { "IMAGE": "ghcr.io/home-assistant/home-assistant:stable", "UPDATE": "true", @@ -23,8 +44,13 @@ "TYPE": "tcp" } ], - "ENVS": [], - "EXTRA": "--restart always", + "ENVS": [ + { + "NAME": "TZ", + "VALUE": "#HOMEASSISTANT_TZ" + } + ], + "EXTRA": "--restart unless-stopped", "DEPEND": [], "START_ON_BOOT": "false", "CMD": "null", diff --git a/homeassistant/template.json b/homeassistant/template.json index 47b5f64..0b438cf 100644 --- a/homeassistant/template.json +++ b/homeassistant/template.json @@ -6,6 +6,12 @@ "key": "HOMEASSISTANT_DOMAIN", "value": "", "required": "true" + }, + { + "description": "Please add your homeassistant timezone:", + "key": "HOMEASSISTANT_TZ", + "value": "", + "required": "true" } ] } \ No newline at end of file