mirror of
https://github.com/Tony0410/quietthanks.git
synced 2026-05-24 13:21:38 +08:00
Implement server-side push notifications with scheduler and always-remind option
This commit is contained in:
@@ -9,3 +9,25 @@ services:
|
||||
- ./data:/app/data
|
||||
environment:
|
||||
- DATABASE_PATH=/app/data/quietthanks.db
|
||||
- NEXT_PUBLIC_VAPID_PUBLIC_KEY=BIKukAq5-KPwJAMpksxD7UNL8XfF-oJOI0CLGGZQAY93igZgf1PYa9MVvS8GaBv-vv9ckcXPCEKdzWDCtOyQpKg
|
||||
- VAPID_PRIVATE_KEY=IBkQ14BLKFCg2PmGOWheC7xfYHS5J49vXS8duHCeDBw
|
||||
- VAPID_EMAIL=mailto:admin@quietthanks.local
|
||||
- TZ=Australia/Perth
|
||||
|
||||
scheduler:
|
||||
image: alpine
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
quietthanks:
|
||||
condition: service_started
|
||||
environment:
|
||||
- TZ=Australia/Perth
|
||||
entrypoint: /bin/sh
|
||||
command: >
|
||||
-c "apk add --no-cache curl &&
|
||||
while true; do
|
||||
echo 'Checking for notifications...' &&
|
||||
curl -s -X POST http://quietthanks:3000/api/notifications/send &&
|
||||
echo '' &&
|
||||
sleep 60;
|
||||
done"
|
||||
|
||||
Reference in New Issue
Block a user