774954fce7
- Add offline expiration handling for patch artifacts in the database. - Update CreatePatchArtifact and related functions to accept and return offline expiration timestamps. - Enhance patch check responses to include offline expiration metadata. - Introduce device-specific encryption for patches, allowing for secure delivery. - Implement tests for patch check functionality, including scenarios for expired patches and encrypted delivery. - Modify router and configuration to support new patch delivery settings. - Update database schema and migrations to accommodate new fields for offline expiration.
59 lines
2.0 KiB
Bash
59 lines
2.0 KiB
Bash
# Shorebird Self-Hosted Server Configuration
|
|
# Copy this file to .env and adjust values as needed.
|
|
|
|
# --- Server ---
|
|
SERVER_HOST=0.0.0.0
|
|
SERVER_PORT=8080
|
|
# Public-facing URL (used for download links in local storage mode)
|
|
SERVER_BASE_URL=http://localhost:8080
|
|
|
|
# --- Database ---
|
|
# Driver: "sqlite" (default, zero-dependency) or "postgres"
|
|
DB_DRIVER=sqlite
|
|
# SQLite path (relative to working directory; data/ is auto-created)
|
|
DB_PATH=data/shorebird.db
|
|
# PostgreSQL URL (only used when DB_DRIVER=postgres)
|
|
# DATABASE_URL=postgres://shorebird:shorebird@localhost:5432/shorebird?sslmode=disable
|
|
|
|
# --- Storage ---
|
|
# Driver: "local" (default, zero-dependency) or "s3"
|
|
STORAGE_DRIVER=local
|
|
# Local storage directory (auto-created)
|
|
STORAGE_LOCAL_DIR=data/storage
|
|
# S3/MinIO settings (only used when STORAGE_DRIVER=s3)
|
|
# STORAGE_S3_ENDPOINT=localhost:9000
|
|
# STORAGE_S3_ACCESS_KEY=minioadmin
|
|
# STORAGE_S3_SECRET_KEY=minioadmin
|
|
# STORAGE_S3_USE_SSL=false
|
|
# STORAGE_S3_RELEASE_BUCKET=shorebird-releases
|
|
# STORAGE_S3_PATCH_BUCKET=shorebird-patches
|
|
|
|
# --- Patch delivery encryption (optional) ---
|
|
# Default is off for Shorebird updater compatibility. Clients must also send
|
|
# accept_encrypted_patch=true in /api/v1/patches/check to receive ciphertext.
|
|
# PATCH_DELIVERY_ENCRYPTION=per_device_aes_gcm
|
|
# PATCH_DELIVERY_AES_SECRET=replace-with-a-long-random-server-secret
|
|
# PATCH_DELIVERY_CACHE_ENCRYPTED=true
|
|
|
|
# --- Authentication ---
|
|
JWT_SECRET=change-me-in-production-use-a-long-random-string
|
|
|
|
# --- Bootstrap admin ---
|
|
# Created automatically if missing. This account must change password on first login.
|
|
DEFAULT_ADMIN_EMAIL=admin@example.com
|
|
DEFAULT_ADMIN_PASSWORD=admin123
|
|
DEFAULT_ADMIN_NAME=Administrator
|
|
|
|
# --- Account email ---
|
|
# SMTP is used for email verification and password reset links.
|
|
# If SMTP_HOST is empty, links are logged to the server console for local/dev use.
|
|
# SMTP_HOST=smtp.example.com
|
|
# SMTP_PORT=587
|
|
# SMTP_USERNAME=
|
|
# SMTP_PASSWORD=
|
|
# SMTP_FROM=shorebird@example.com
|
|
|
|
# --- Redis (optional) ---
|
|
# REDIS_ADDR=localhost:6379
|
|
# REDIS_PASSWORD=
|