SkateSpots/push-service/.env.example
SkateSpots 5f0a9537b0 feat(push): Android FCM (Phase 2) - native device support
Server: /native/subscribe + /native/unsubscribe (NIP-98 proof), FCM device store,
and FCM HTTP v1 sending (service-account OAuth2, cached ~1h); /health reports
native + device count. 503 without PUSH_FIREBASE_SERVICE_ACCOUNT_JSON.
Client: @capacitor/push-notifications (lazily imported, native-only) in
usePushNotifications - request permission, register, store the FCM token, and
subscribe via /native/subscribe; tap deep-links into the app.
Needs a Firebase project: google-services.json + the Gradle plugin (android/),
and the service-account JSON in the host .env.
2026-10-01 19:28:54 +07:00

31 lines
1.2 KiB
Text

# SkateSpots push service — copy to .env and fill in.
# Port to listen on (Caddy proxies to this).
PORT=8788
# VAPID keys for Web Push. Generate once with:
# node -e "console.log(require('web-push').generateVAPIDKeys())"
# Keep the private key secret. Changing these INVALIDATES all subscriptions.
PUSH_VAPID_SUBJECT=mailto:owner@skate-spots.org
PUSH_VAPID_PUBLIC_KEY=
PUSH_VAPID_PRIVATE_KEY=
# Relays to watch for push-marked kind-1059 wraps (comma-separated).
PUSH_RELAYS=wss://goskatespots.nostr1.com
# The plaintext push marker tag name on recipient wraps: ["<marker>", "push"].
PUSH_MARKER=skatespots
# Where subscriptions + challenges are stored.
PUSH_STORAGE_PATH=/home/ubuntu/skatespots-push/push-state.json
# How far back to look on each (re)subscribe, in seconds. Default 3 days.
PUSH_LOOKBACK_SECONDS=259200
# Origins allowed to call /subscribe (comma-separated).
PUSH_ALLOWED_ORIGINS=https://skate-spots.org,http://localhost:8080
# Native (FCM) push. A SINGLE-LINE Firebase service-account JSON (project_id,
# client_email, private_key). Without it, /native/subscribe answers 503 and they
# native path is disabled — web push is unaffected.
PUSH_FIREBASE_SERVICE_ACCOUNT_JSON=