This commit is contained in:
cpu
2025-03-28 19:21:40 +01:00
parent 4f76bae187
commit d47bceeb43
10 changed files with 130 additions and 157 deletions

View File

@@ -4,12 +4,13 @@
# Generate using: npx web-push generate-vapid-keys
VAPID_PUBLIC_KEY=
VAPID_PRIVATE_KEY=
VAPID_SUBJECT=mailto:mailto:admin@virtonline.eu # Contact email/URL for push service
VAPID_SUBJECT=mailto:mailto:user@example.org
# --- Server Configuration ---
PORT=3000 # Internal port for the Node.js app
SUBSCRIPTIONS_FILE=subscriptions.json # Path inside the container
DEFAULT_BUTTON_NAME=game-button # Default button name to use when not specified
# Internal port for the Node.js app
PORT=3000
SUBSCRIPTIONS_FILE=/app/subscriptions.json
DEFAULT_BUTTON_NAME=game-button
# --- Authentication (Optional) ---
# If both USERNAME and PASSWORD are set, Basic Auth will be enabled for:
@@ -19,21 +20,19 @@ DEFAULT_BUTTON_NAME=game-button # Default button name to use when not specified
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) ---
MAX_NOTIFICATION_RETRIES=3 # Number of retries on failure (e.g., DNS issues)
INITIAL_RETRY_DELAY_MS=1000 # Initial delay in milliseconds
# Number of retries on failure (e.g., DNS issues)
NOTIFICATION_MAX_RETRIES=3
# First retry delay in milliseconds (minimal delay for immediate retry)
NOTIFICATION_FIRST_RETRY_DELAY_MS=10
# Base delay in milliseconds for subsequent retries (used for exponential backoff)
NOTIFICATION_SUBSEQUENT_RETRY_DELAY_MS=1000
# --- Network Configuration (Optional) ---
DNS_TIMEOUT_MS=5000 # Timeout for DNS lookups (ms)
HTTP_TIMEOUT_MS=10000 # Timeout for outgoing HTTP requests (ms)
# 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