From f9a999c4d01dddbcd1c379412f4faf3b42dd1f7b Mon Sep 17 00:00:00 2001 From: Jokob-sk Date: Fri, 22 Mar 2024 12:38:11 +1100 Subject: [PATCH] tz work on #599 --- Dockerfile | 2 +- dockerfiles/README.md | 11 ++--------- dockerfiles/setup.sh | 6 +++++- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index b58c1e68..765c52f2 100755 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 # ❗ IMPORTANT - if you modify this file modify the /install/install_dependecies.sh file as well ❗ RUN apk update --no-cache \ - && apk add --no-cache bash zip lsblk gettext-envsubst sudo mtr s6-overlay \ + && apk add --no-cache bash zip lsblk gettext-envsubst sudo mtr tzdata s6-overlay \ && apk add --no-cache curl arp-scan iproute2 iproute2-ss nmap traceroute net-tools net-snmp-tools bind-tools awake ca-certificates \ && apk add --no-cache sqlite php82 php82-fpm php82-cgi php82-curl php82-sqlite3 php82-session \ && apk add --no-cache python3 nginx \ diff --git a/dockerfiles/README.md b/dockerfiles/README.md index aee628c9..97ae4ff5 100755 --- a/dockerfiles/README.md +++ b/dockerfiles/README.md @@ -60,7 +60,7 @@ docker run -d --rm --network=host \ > Use separate `db` and `config` directories, don't nest them. -### Modify the config (`pialert.conf`) only if UI is not available +### (If UI is not available) Modify the config (`pialert.conf`) - The preferred way is to manage the configuration via the Settings section in the UI. - You can modify [pialert.conf](https://github.com/jokob-sk/Pi.Alert/tree/main/config) directly, if needed. @@ -235,14 +235,7 @@ Courtesy of [pbek](https://github.com/pbek). The volume `pialert_db` is used by Big thanks to @Macleykun & for help and tips&tricks for Dockerfile(s) and @vladaurosh for Alpine re-base help. -## ❤ Support me - -Get: -- Regular updates to keep your data and family safe 🔄 -- Better and more functionality➕ -- I don't get burned out and the app survives longer🔥🤯 -- Quicker and better support with issues 🆘 -- Less grumpy me 😄 +## ❤ Support me to prevent my burnout 🔥🤯 | [![GitHub](https://i.imgur.com/emsRCPh.png)](https://github.com/sponsors/jokob-sk) | [![Buy Me A Coffee](https://i.imgur.com/pIM6YXL.png)](https://www.buymeacoffee.com/jokobsk) | [![Patreon](https://i.imgur.com/MuYsrq1.png)](https://www.patreon.com/user?u=84385063) | | --- | --- | --- | diff --git a/dockerfiles/setup.sh b/dockerfiles/setup.sh index 2294cdc6..d2978898 100755 --- a/dockerfiles/setup.sh +++ b/dockerfiles/setup.sh @@ -37,8 +37,12 @@ cp -na "${INSTALL_DIR}/pialert/back/pialert.db" "${FILEDB}" # if custom variables not set we do not need to do anything if [ -n "${TZ}" ]; then FILECONF="${INSTALL_DIR}/pialert/config/pialert.conf" - echo "[INSTALL] Setup timezone" + echo "[INSTALL] Setup timezone" sed -i "\#^TIMEZONE=#c\TIMEZONE='${TZ}'" "${FILECONF}" + + # set TimeZone in container + cp /usr/share/zoneinfo/$TZ /etc/localtime + echo $TZ > /etc/timezone fi echo "[INSTALL] Setup NGINX"