* add ha_addons repository to cscode workspace * Issue220 ha addon dokumentation update (#232) * initial DOCS.md for Addon * links to Mosquitto and Adguard * replaced _ by . for PV-Strings * mentioned add-on installation method in README.md * fix most of the markdown linter warnings * add missing alt texts * added nice add repository to my Home Assistant badges --------- Co-authored-by: Michael Metz <michael.metz@siemens.com> Co-authored-by: Stefan Allius <stefan.allius@t-online.de> * S allius/issue216 (#235) * improve docker run - establish multistage Dockerfile - build a python wheel for all needed packages - remove unneeded tools like apk for runtime * pin versions, fix hadolint warnings * merge from dev-0.12 --------- Co-authored-by: Michael Metz <michael.metz@siemens.com> * Issue220 ha addon dokumentation update (#245) * revised config disclaimer * add newline at end of file to fix linter warning --------- Co-authored-by: Michael Metz <michael.metz@siemens.com> * 238 ha addon repository check (#244) * move Makefile and bake file into parent folder * build config.yaml from template * use Makefile instead of build shell script * ignore temporary or created files * add rules for building the add-on repository * add rel version of add-on * add jinja2-cli * ignore inverter replays which a older than 1 day (#246) * S allius/issue7 (#248) * report alarm and fault bitfield to ha * define the alarm and fault names * configure log path and max number of daily log files (#243) * configure log path and max number of daily log files * don't use a subfolder for configs * use make instead of a build script * mount /homeassistant/tsun-proxy * Add venv to base image * give write access to mounted folder * intial checkin, ignore SC1091 * set advanced and stage value in config.yaml * fix typo * added watchdog and removed Port 8127 from mapping * fixed typo and use new add-on repro - change the install button to install from https://github.com/s-allius/ha-addons * add addon-rel target * disable watchdog due to exceptions in the ha supervisor * update changelog --------- Co-authored-by: Michael Metz <michael.metz@siemens.com> * Update README.md (#251) install `https://github.com/s-allius/ha-addons` as repro for our add-on * add german language file (#253) * fix return type get_extra_info in FakeWriter * move global startup code into main methdod * pin version of base image * avoid forwarding to a private (lokal) IP addr (#256) * avoid forwarding to a private (lokal) IP addr * test DNS resolver issues * increase test coverage * update changelog * fix client_mode configuration block (#252) * fix client_mode block * add client mode * fix tests with client_mode values * log client_mode configuration * add forward flag for client_mode * improve startup logging * added client_mode example * adjusted translation files * AT commands added * typo * missing "PLUS" * link to config details * improve log msg for config problems * improve log msg on config errors * improve log msg for config problems * copy CHANGELOG.md into add-on repro --------- Co-authored-by: Michael Metz <michael.metz@siemens.com> * rename "ConfigErr" to match naming convention * disable test coverage for __main__ * update changelog version 0.12 --------- Co-authored-by: metzi <147942647+mime24@users.noreply.github.com> Co-authored-by: Michael Metz <michael.metz@siemens.com>
94 lines
2.4 KiB
HCL
94 lines
2.4 KiB
HCL
variable "IMAGE" {
|
|
default = "tsun-gen3-proxy"
|
|
}
|
|
variable "VERSION" {
|
|
default = "0.0.0"
|
|
}
|
|
variable "MAJOR" {
|
|
default = "0"
|
|
}
|
|
variable "BUILD_DATE" {
|
|
default = "dev"
|
|
}
|
|
variable "BRANCH" {
|
|
default = ""
|
|
}
|
|
variable "DESCRIPTION" {
|
|
default = "This proxy enables a reliable connection between TSUN third generation inverters (eg. TSOL MS600, MS800, MS2000) and an MQTT broker to integrate the inverter into typical home automations."
|
|
}
|
|
|
|
target "_common" {
|
|
context = "."
|
|
dockerfile = "Dockerfile"
|
|
args = {
|
|
VERSION = "${VERSION}"
|
|
environment = "production"
|
|
}
|
|
attest = [
|
|
"type =provenance,mode=max",
|
|
"type =sbom,generator=docker/scout-sbom-indexer:latest"
|
|
]
|
|
annotations = [
|
|
"index:org.opencontainers.image.title=TSUN Gen3 Proxy",
|
|
"index:org.opencontainers.image.authors=Stefan Allius",
|
|
"index:org.opencontainers.image.created=${BUILD_DATE}",
|
|
"index:org.opencontainers.image.version=${VERSION}",
|
|
"index:org.opencontainers.image.revision=${BRANCH}",
|
|
"index:org.opencontainers.image.description=${DESCRIPTION}",
|
|
"index:org.opencontainers.image.licenses=BSD-3-Clause",
|
|
"index:org.opencontainers.image.source=https://github.com/s-allius/tsun-gen3-proxy"
|
|
]
|
|
labels = {
|
|
"org.opencontainers.image.title" = "TSUN Gen3 Proxy"
|
|
"org.opencontainers.image.authors" = "Stefan Allius"
|
|
"org.opencontainers.image.created" = "${BUILD_DATE}"
|
|
"org.opencontainers.image.version" = "${VERSION}"
|
|
"org.opencontainers.image.revision" = "${BRANCH}"
|
|
"org.opencontainers.image.description" = "${DESCRIPTION}"
|
|
"org.opencontainers.image.licenses" = "BSD-3-Clause"
|
|
"org.opencontainers.image.source" = "https://github.com/s-allius/tsun-gen3-proxy"
|
|
}
|
|
output = [
|
|
"type=image,push=true"
|
|
]
|
|
|
|
no-cache = false
|
|
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7"]
|
|
}
|
|
|
|
target "_debug" {
|
|
args = {
|
|
LOG_LVL = "DEBUG"
|
|
environment = "dev"
|
|
}
|
|
}
|
|
target "_prod" {
|
|
args = {
|
|
}
|
|
}
|
|
target "debug" {
|
|
inherits = ["_common", "_debug"]
|
|
tags = ["${IMAGE}:debug"]
|
|
}
|
|
|
|
target "dev" {
|
|
inherits = ["_common"]
|
|
tags = ["${IMAGE}:dev"]
|
|
}
|
|
|
|
target "preview" {
|
|
inherits = ["_common", "_prod"]
|
|
tags = ["${IMAGE}:preview", "${IMAGE}:${VERSION}"]
|
|
}
|
|
|
|
target "rc" {
|
|
inherits = ["_common", "_prod"]
|
|
tags = ["${IMAGE}:rc", "${IMAGE}:${VERSION}"]
|
|
}
|
|
|
|
target "rel" {
|
|
inherits = ["_common", "_prod"]
|
|
tags = ["${IMAGE}:latest", "${IMAGE}:${MAJOR}", "${IMAGE}:${VERSION}"]
|
|
no-cache = true
|
|
}
|