- Remove Mattermost integration (OAuth, channel bridge, file sync watcher, frontend import modal). RefBoard now ships as a self-contained app. - Replace SSO Login screen with email/password form (+ optional register link gated by ALLOW_SELF_REGISTRATION). - Add SEED_ADMIN_EMAIL / SEED_ADMIN_PASSWORD env-var bootstrap so a fresh install ships with an admin account on first boot (idempotent). - ALLOW_SELF_REGISTRATION flag (default false) gates POST /api/auth/register. First user can always register (auto-promoted to admin). - Drop mattermost_id and mm_file_id columns + board_channel_links table from the schema; remove related db helpers and exports. - Add MIT LICENSE, comprehensive README, .env.example, docker-compose.yml (bundles MinIO so one command boots a working stack). - Expand .gitignore for typical Node + Docker dev artefacts.
59 lines
2.2 KiB
Bash
59 lines
2.2 KiB
Bash
# ────────────────────────────────────────────────
|
|
# RefBoard — Environment Configuration
|
|
# Copy this file to `.env` and edit values for your install.
|
|
# ────────────────────────────────────────────────
|
|
|
|
# ---- Server ----
|
|
PORT=8000
|
|
NODE_ENV=development
|
|
CORS_ORIGIN=*
|
|
|
|
# ---- JWT auth ----
|
|
# REQUIRED in production. Generate with: openssl rand -base64 64
|
|
JWT_SECRET=change-me-to-a-long-random-string
|
|
JWT_EXPIRES_IN=7d
|
|
|
|
# ---- SQLite database ----
|
|
# Path inside the running process. Defaults to /app/data/refboard.db (Docker).
|
|
# For local non-Docker dev, set this to ./data/refboard.db (relative to backend/).
|
|
DB_PATH=/app/data/refboard.db
|
|
|
|
# ---- Object storage (MinIO / any S3-compatible) ----
|
|
MINIO_ENDPOINT=minio
|
|
MINIO_PORT=9000
|
|
MINIO_USE_SSL=false
|
|
MINIO_ACCESS_KEY=minioadmin
|
|
MINIO_SECRET_KEY=minioadmin
|
|
MINIO_BUCKET=refboard
|
|
|
|
# Public-facing base URL for media. Leave empty to serve via the backend proxy
|
|
# (recommended for self-hosted single-box installs).
|
|
PUBLIC_URL=
|
|
|
|
# Max upload size in MB (per file). Defaults to 200.
|
|
MAX_FILE_SIZE_MB=200
|
|
|
|
# ---- First-run admin bootstrap ----
|
|
# When the server starts and no user with this email exists, RefBoard will
|
|
# create one with role=admin. Idempotent — runs every boot but only seeds once.
|
|
# Leave blank to skip seeding.
|
|
SEED_ADMIN_EMAIL=
|
|
SEED_ADMIN_PASSWORD=
|
|
SEED_ADMIN_USERNAME=
|
|
SEED_ADMIN_DISPLAY_NAME=
|
|
|
|
# ---- Self-registration ----
|
|
# When "true", the public /api/auth/register endpoint accepts new signups.
|
|
# When "false" (default), only admins can create accounts (via /api/admin/users).
|
|
# The very first user can always register, regardless of this flag, and is
|
|
# auto-promoted to admin.
|
|
ALLOW_SELF_REGISTRATION=false
|
|
|
|
# Frontend mirror — controls whether the Login screen shows the "Register" link.
|
|
# Must be set at *build* time (Vite) for the bundled frontend, not at runtime.
|
|
VITE_ALLOW_SELF_REGISTRATION=false
|
|
|
|
# ---- Optional: API key for bot / programmatic upload ----
|
|
# If set, /api/upload/api-key endpoints require this header value.
|
|
REFBOARD_API_KEY=
|