Files
flic-webhook-webpush/.env.example
2025-03-28 20:38:27 +01:00

47 lines
1.5 KiB
Plaintext

# Flic to PWA WebPush Configuration
# --- VAPID Keys (Required) ---
# Generate using: npx web-push generate-vapid-keys
VAPID_PUBLIC_KEY=
VAPID_PRIVATE_KEY=
VAPID_SUBJECT=mailto:mailto:admin@virtonline.eu
# --- Server Configuration ---
# Internal port for the Node.js app
PORT=3000
# Path inside the container
SUBSCRIPTIONS_FILE=/app/subscriptions.json
# Default button name to use when not specified
DEFAULT_BUTTON_NAME=game-button
# --- Authentication (Optional) ---
# If both USERNAME and PASSWORD are set, Basic Auth will be enabled for:
# - POST /subscribe
# - GET /webhook
# Leave blank to disable authentication.
BASIC_AUTH_USERNAME=user12345
BASIC_AUTH_PASSWORD=password
# --- CORS Configuration (Optional but Recommended) ---
# Comma-separated list of allowed origins for requests (e.g., your PWA frontend URL)
# If blank or not set, CORS might block browser requests (like from a setup page).
# Use '*' carefully, preferably list specific domains.
ALLOWED_ORIGINS=https://game-timer.virtonline.eu
ALLOWED_METHODS=POST,GET,OPTIONS
ALLOWED_HEADERS=Content-Type,Authorization
# --- Web Push Retry Configuration (Optional) ---
# Number of retries on failure (e.g., DNS issues)
MAX_NOTIFICATION_RETRIES=3
# Initial delay in milliseconds
INITIAL_RETRY_DELAY_MS=1000
# --- Network Configuration (Optional) ---
# Timeout for DNS lookups (ms)
DNS_TIMEOUT_MS=5000
# Timeout for outgoing HTTP requests (ms)
HTTP_TIMEOUT_MS=10000
# --- Logging ---
# Controls log verbosity: error, warn, info, debug
LOG_LEVEL=info