-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
14 changed files
with
124 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ignored: | ||
- SC1091 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!make | ||
include ../.env | ||
|
||
SHELL = /bin/sh | ||
IMAGE = tsun-gen3-proxy | ||
|
||
|
||
# Folders | ||
SRC=. | ||
SRC_PROXY=$(SRC)/src | ||
CNF_PROXY=$(SRC)/config | ||
|
||
DST=rootfs | ||
DST_PROXY=$(DST)/home/proxy | ||
|
||
# collect source files | ||
SRC_FILES := $(wildcard $(SRC_PROXY)/*.py)\ | ||
$(wildcard $(SRC_PROXY)/*.ini)\ | ||
$(wildcard $(SRC_PROXY)/cnf/*.py)\ | ||
$(wildcard $(SRC_PROXY)/gen3/*.py)\ | ||
$(wildcard $(SRC_PROXY)/gen3plus/*.py) | ||
CNF_FILES := $(wildcard $(CNF_PROXY)/*.toml) | ||
|
||
# determine destination files | ||
TARGET_FILES = $(SRC_FILES:$(SRC_PROXY)/%=$(DST_PROXY)/%) | ||
CONFIG_FILES = $(CNF_FILES:$(CNF_PROXY)/%=$(DST_PROXY)/%) | ||
|
||
export BUILD_DATE := ${shell date -Iminutes} | ||
VERSION := $(shell cat $(SRC)/.version) | ||
export MAJOR := $(shell echo $(VERSION) | cut -f1 -d.) | ||
|
||
PUBLIC_URL := $(shell echo $(PUBLIC_CONTAINER_REGISTRY) | cut -f1 -d/) | ||
PUBLIC_USER :=$(shell echo $(PUBLIC_CONTAINER_REGISTRY) | cut -f2 -d/) | ||
|
||
|
||
dev debug: | ||
@echo version: $(VERSION) build-date: $(BUILD_DATE) image: $(PRIVAT_CONTAINER_REGISTRY)$(IMAGE) | ||
export VERSION=$(VERSION)-$@ && \ | ||
export IMAGE=$(PRIVAT_CONTAINER_REGISTRY)$(IMAGE) && \ | ||
docker buildx bake -f docker-bake.hcl $@ | ||
|
||
preview rc rel: | ||
@echo version: $(VERSION) build-date: $(BUILD_DATE) image: $(PUBLIC_CONTAINER_REGISTRY)$(IMAGE) | ||
@echo login at $(PUBLIC_URL) as $(PUBLIC_USER) | ||
@DO_LOGIN="$(shell echo $(PUBLIC_CR_KEY) | docker login $(PUBLIC_URL) -u $(PUBLIC_USER) --password-stdin)" | ||
export VERSION=$(VERSION)-$@ && \ | ||
export IMAGE=$(PUBLIC_CONTAINER_REGISTRY)$(IMAGE) && \ | ||
docker buildx bake -f docker-bake.hcl $@ | ||
|
||
|
||
|
||
.PHONY: debug dev preview rc rel | ||
|
||
|
||
$(CONFIG_FILES): $(DST_PROXY)/% : $(CNF_PROXY)/% | ||
@echo Copy $< to $@ | ||
@mkdir -p $(@D) | ||
@cp $< $@ | ||
|
||
$(TARGET_FILES): $(DST_PROXY)/% : $(SRC_PROXY)/% | ||
@echo Copy $< to $@ | ||
@mkdir -p $(@D) | ||
@cp $< $@ | ||
|
||
$(DST)/requirements.txt : $(SRC)/requirements.txt | ||
@echo Copy $< to $@ | ||
@cp $< $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters