ntfy : TZ

This commit is contained in:
Gitouche 2022-11-18 12:12:29 +01:00
parent 6e192551a8
commit ce254cf882
3 changed files with 8 additions and 2 deletions

View file

@ -14,7 +14,11 @@ if ! podman image exists ${ntfy_image}:${ntfy_version}; then
podman image pull ${ntfy_image}:${ntfy_version} || exit 1 podman image pull ${ntfy_image}:${ntfy_version} || exit 1
fi fi
podman run --name ${container_name} -p ${listen_if}:${listen_port}:8080 -d ${ntfy_image}:${ntfy_version} serve --listen-http :8080 --base-url ${GARBAYE_NTFY_BASE_URL} && podman run --name ${container_name} \
-p ${listen_if}:${listen_port}:8080 \
-e TZ='Europe/Paris' \
-d ${ntfy_image}:${ntfy_version} serve \
--listen-http :8080 --base-url ${GARBAYE_NTFY_BASE_URL} &&
( podman logs -f ${container_name} 2>&1 & ) | grep -q 'INFO Listening on' && ( podman logs -f ${container_name} 2>&1 & ) | grep -q 'INFO Listening on' &&
podman cp config/server.yml ${container_name}:/etc/ntfy/server.yml && podman cp config/server.yml ${container_name}:/etc/ntfy/server.yml &&
podman stop ${container_name} && podman stop ${container_name} &&

View file

@ -8,7 +8,7 @@ ensure_pwd_is_scriptdir
ensure_not_root ensure_not_root
if ! podman image exists ${ntfy_image}:${ntfy_version}; then if ! podman image exists ${ntfy_image}:${ntfy_version}; then
TMPDIR=${HOME} podman build -t "${ntfy_image}:${ntfy_version}" docker/ --build-arg NTFY_VERSION=${ntfy_version} TMPDIR=${HOME} podman build -t "${ntfy_image}:${ntfy_version}" docker/ --build-arg NTFY_VERSION=${ntfy_version} || exit 1
podman image prune -a -f --filter dangling=true podman image prune -a -f --filter dangling=true
podman image prune -a -f --filter intermediate=true podman image prune -a -f --filter intermediate=true
podman image rm -f $(podman images -a -q -- docker.io/library/golang) podman image rm -f $(podman images -a -q -- docker.io/library/golang)

View file

@ -20,6 +20,8 @@ LABEL maintainer="contact@garbaye.fr"
EXPOSE 80/tcp EXPOSE 80/tcp
RUN apk add --no-cache tzdata
RUN adduser \ RUN adduser \
-S -H -D \ -S -H -D \
ntfy && \ ntfy && \