S allius/issue385 (#386)
* ignore translation and log files * add quart-babel * build and install translation files * don't export the web-ui port 8127 - for security reason the user should use the HA ingress and not the direkt access to the web dashboard * set 'lang' in html tag
This commit is contained in:
@@ -12,11 +12,14 @@ IMAGE = tsun-gen3-addon
|
||||
SRC=../app
|
||||
SRC_PROXY=$(SRC)/src
|
||||
CNF_PROXY=$(SRC)/config
|
||||
TRANSLATION_PROXY=$(SRC)/translations
|
||||
|
||||
# Target folders for building the local add-on and the docker container
|
||||
ADDON_PATH = ha_addon
|
||||
DST=$(ADDON_PATH)/rootfs
|
||||
DST_PROXY=$(DST)/home/proxy
|
||||
DST_TRANSLATION=$(DST)/home/translations
|
||||
|
||||
|
||||
# base director of the add-on repro for installing the add-on git repros
|
||||
INST_BASE=../../ha-addons
|
||||
@@ -92,12 +95,14 @@ SRC_FILES := $(wildcard $(SRC_PROXY)/*.py)\
|
||||
$(wildcard $(SRC_PROXY)/web/static/images/*)
|
||||
|
||||
CNF_FILES := $(wildcard $(CNF_PROXY)/*.toml)
|
||||
MO_FILES := $(wildcard $(TRANSLATION_PROXY)/de/LC_MESSAGES/*.mo)
|
||||
|
||||
# determine destination files
|
||||
TARGET_FILES = $(SRC_FILES:$(SRC_PROXY)/%=$(DST_PROXY)/%)
|
||||
CONFIG_FILES = $(CNF_FILES:$(CNF_PROXY)/%=$(DST_PROXY)/%)
|
||||
TRANSLATION_FILES = $(MO_FILES:$(TRANSLATION_PROXY)/%=$(DST_TRANSLATION)/%)
|
||||
|
||||
rootfs: $(TARGET_FILES) $(CONFIG_FILES) $(DST)/requirements.txt
|
||||
rootfs: $(TARGET_FILES) $(CONFIG_FILES) $(TRANSLATION_FILES) $(DST)/requirements.txt
|
||||
|
||||
$(CONFIG_FILES): $(DST_PROXY)/% : $(CNF_PROXY)/%
|
||||
@echo Copy $< to $@
|
||||
@@ -109,6 +114,11 @@ $(TARGET_FILES): $(DST_PROXY)/% : $(SRC_PROXY)/%
|
||||
@mkdir -p $(@D)
|
||||
@cp $< $@
|
||||
|
||||
$(TRANSLATION_FILES): $(DST_TRANSLATION)/% : $(TRANSLATION_PROXY)/%
|
||||
@echo Copy $< to $@
|
||||
@mkdir -p $(@D)
|
||||
@cp $< $@
|
||||
|
||||
$(DST)/requirements.txt : $(SRC)/requirements.txt
|
||||
@echo Copy $< to $@
|
||||
@cp $< $@
|
||||
|
||||
@@ -23,11 +23,11 @@ services:
|
||||
ports:
|
||||
5005/tcp: 5005
|
||||
10000/tcp: 10000
|
||||
8127/tcp: 8127
|
||||
webui: "http://[HOST]:[PORT:8127]/"
|
||||
watchdog: "http://[HOST]:[PORT:8127]/-/healthy"
|
||||
ingress: true
|
||||
ingress_port: 8127
|
||||
panel_icon: "mdi:application-cog-outline"
|
||||
|
||||
# Definition of parameters in the configuration tab of the addon
|
||||
# parameters are available within the container as /data/options.json
|
||||
|
||||
Reference in New Issue
Block a user