From b035c9475da424af9bfe3168621125ac8506dde4 Mon Sep 17 00:00:00 2001 From: chiko Date: Fri, 24 Oct 2025 02:48:00 +0200 Subject: [PATCH] Some Cleanup and minor Changes --- Dockerfile | 7 ++++--- docker-compose.yml | 9 +++------ src/sendNotification.ts | 4 ++-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 01a20e8..b7bbf35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ ARG BUILD_DATE ARG VERSION LABEL build_version="77th_eventcalendarntfy ${VERSION}, Build-date:- ${BUILD_DATE}" LABEL maintainer="chiko " +ENV TZ=Europe/Berlin WORKDIR /opt/app RUN set -eux && \ echo "Updating APT" && \ @@ -10,12 +11,12 @@ RUN set -eux && \ apt-get upgrade -y -qq && \ echo "Installing tools" && \ apt-get install -y -qq \ - curl unzip cron ca-certificates logrotate dos2unix && \ + curl unzip cron ca-certificates logrotate dos2unix tzdata && \ echo "Remove exim" && \ apt-get remove -y -qq exim4 exim4-base exim4-daemon-light && \ echo "Cleaning up" && \ - apt-get --yes autoremove --purge && \ - apt-get clean --yes && \ + apt-get --yes autoremove --purge -qq && \ + apt-get clean --yes -qq && \ rm --recursive --force --verbose /var/lib/apt/lists/* && \ rm --recursive --force --verbose /tmp/* && \ rm --recursive --force --verbose /var/tmp/* && \ diff --git a/docker-compose.yml b/docker-compose.yml index 8b30198..85a9ba8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,6 @@ services: app: + image: chiko/77th_eventcalendarntfy:dev build: . volumes: - ./data/db:/opt/app/data/db @@ -12,7 +13,7 @@ services: links: - apprise apprise: - image: caronc/apprise:latest + image: caronc/apprise:1.2.2 hostname: apprise environment: - APPRISE_WORKER_COUNT=1 @@ -29,8 +30,4 @@ services: test: ["CMD", "curl", "-f", "http://localhost:8000/status"] interval: 5s timeout: 3s - retries: 5 -# networks: -# default: -# external: true -# name: npm \ No newline at end of file + retries: 5 \ No newline at end of file diff --git a/src/sendNotification.ts b/src/sendNotification.ts index 66e61d4..3f541be 100644 --- a/src/sendNotification.ts +++ b/src/sendNotification.ts @@ -9,7 +9,7 @@ export async function sendNotification(title: string, body: string, link?: strin const response = await fetch("http://apprise:8000/notify", { method: "POST", headers: { - "Content-Type": "application/json" + "Content-Type": "application/json" }, body: JSON.stringify({ urls: [ @@ -18,7 +18,7 @@ export async function sendNotification(title: string, body: string, link?: strin ].join(","), title: title, body: body, - format: "text" + format: "markdown" }) }); const responseBody = await response.json();