diff --git a/.env.example b/.env.example index 917ee89..456ae94 100644 --- a/.env.example +++ b/.env.example @@ -3,7 +3,7 @@ DB_PATH=./data/events.sqlite # Apprise API service apprise_host=apprise -apprise_port=80 +apprise_port=8000 apprise_https=false notification_mock=false diff --git a/README.md b/README.md index 92a7208..ab7058e 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ For production, run `npm run build` followed by `npm start`, and keep the proces ## Docker -Build and start the service with Docker Compose: +Build and start the calendar service and Apprise with Docker Compose: ```sh Copy-Item .env.example .env @@ -39,7 +39,7 @@ Copy-Item .env.example .env docker compose up -d --build ``` -The service listens on port `3000`; set `HOST_PORT` in the shell or Compose `.env` file to change the host port. SQLite data is stored in the persistent `event-data` Docker volume. Follow logs with `docker compose logs -f`, stop with `docker compose down`, and remove the database volume only when you intend to delete the stored events and notification history (`docker compose down -v`). +The calendar service listens on port `3000`; set `HOST_PORT` in the shell or Compose `.env` file to change the host port. Apprise listens on the private Compose network at `apprise:8000` and is not published directly to the internet. SQLite data is stored in the persistent `event-data` Docker volume. Follow both services with `docker compose logs -f`, stop them with `docker compose down`, and remove the database volume only when you intend to delete the stored events and notification history (`docker compose down -v`). To build and run without Compose: diff --git a/compose.yaml b/compose.yaml index ff2bbb8..e4740f6 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,4 +1,20 @@ services: + apprise: + image: caronc/apprise:latest + container_name: apprise + hostname: apprise + restart: unless-stopped + environment: + APPRISE_STATEFUL_MODE: simple + APPRISE_WORKER_COUNT: "1" + APPRISE_DEFAULT_FORMAT: text + TZ: Europe/Berlin + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8000/status"] + interval: 5s + timeout: 3s + retries: 5 + calendar-service: build: . container_name: 77th-ev-cal-ntfy-srv @@ -9,6 +25,13 @@ services: environment: PORT: 3000 DB_PATH: /app/data/events.sqlite + apprise_host: apprise + apprise_port: 8000 + apprise_https: "false" + depends_on: + - apprise + links: + - apprise ports: - "${HOST_PORT:-3000}:3000" volumes: