9ea939ccf6
007_seed_data.sql shipped a fixed admin account whose bcrypt hash decodes to the password "admin", giving every deployment the same known credentials. The seed row is removed; UserService.EnsureAdmin now creates the administrator on startup from ADMIN_USERNAME / ADMIN_PASSWORD. It is idempotent and never overwrites an existing password, so an operator who rotates the admin password keeps it across restarts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
42 lines
1.6 KiB
Bash
42 lines
1.6 KiB
Bash
# =============================================================================
|
|
# Tanabata File Manager — environment variables
|
|
# Copy to .env and fill in the values.
|
|
# =============================================================================
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Server
|
|
# ---------------------------------------------------------------------------
|
|
LISTEN_ADDR=:8080
|
|
JWT_SECRET=change-me-to-a-random-32-byte-secret
|
|
JWT_ACCESS_TTL=15m
|
|
JWT_REFRESH_TTL=720h
|
|
|
|
# Initial administrator, created on first startup if it does not yet exist.
|
|
# Changing the password later (via the API) is preserved across restarts.
|
|
ADMIN_USERNAME=admin
|
|
ADMIN_PASSWORD=change-me-before-first-run
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Database
|
|
# ---------------------------------------------------------------------------
|
|
DATABASE_URL=postgres://tanabata:password@localhost:5432/tanabata?sslmode=disable
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Storage
|
|
# ---------------------------------------------------------------------------
|
|
FILES_PATH=/data/files
|
|
THUMBS_CACHE_PATH=/data/thumbs
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Thumbnails
|
|
# ---------------------------------------------------------------------------
|
|
THUMB_WIDTH=160
|
|
THUMB_HEIGHT=160
|
|
PREVIEW_WIDTH=1920
|
|
PREVIEW_HEIGHT=1080
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Import
|
|
# ---------------------------------------------------------------------------
|
|
IMPORT_PATH=/data/import
|