Files
dashboard/docker-entrypoint.sh
T
fegger dfe246b7ca Add Outlook unread-mail widget with device-code login
- outlook-auth.js: one-time device-code flow against Microsoft login;
  stores the refresh token in the outlook-tokens compose volume
- update-outlook.js: per-minute cron fetching the unread count and the
  latest unread messages via Microsoft Graph; caches access tokens and
  persists rotated refresh tokens
- Widget is hidden until the mailbox is actually authorized, so it
  stays out of sight while (admin) consent is pending
- New external card for Outlook (Office 365) with the official icon
- compose: pass OUTLOOK_CLIENT_ID/OUTLOOK_TENANT/GITEA_TOKEN from .env
- README: Entra ID app registration steps and the tenant-ID hint for
  directories not resolvable via the organizations endpoint
2026-09-04 17:38:17 +02:00

24 lines
925 B
Bash

#!/bin/sh
# Dashboard container entrypoint.
# Starts everything in the background and nginx in the foreground, so a slow
# or unreachable upstream (git hosts, netbird, calendar) never blocks the
# web server from coming up.
# Start the small API proxy (for Open WebUI chat) in the background.
node /opt/dashboard/server.js &
# Start cron daemon in the background to refresh data every 15 minutes.
/usr/sbin/crond -f -l 8 &
# Run the initial data fetch in the background; cron keeps it fresh after that.
( cd /opt/dashboard && node update-data.js ) &
# First health-check sweep in the background; cron re-runs it every minute.
( cd /opt/dashboard && node update-health.js ) &
# Outlook unread mail (no-op until OUTLOOK_CLIENT_ID is set and the device
# login has been completed); cron re-runs it every minute.
( cd /opt/dashboard && node update-outlook.js ) &
# Start nginx in the foreground.
exec nginx -g "daemon off;"