# Copy this file to .env next to docker-compose.yml and fill in real values. # .env is git-ignored — never commit it. # # cp .env.example .env # docker compose up -d # --- Image --- # Which published image tag to run (a version like "1.2.0", or "latest"). APP_TAG=latest # --- App --- API_PORT=3000 # Public origin the app is served from (used for CORS/CSP). Point this at # the URL your users actually load, e.g. https://books.example.com FRONT_END_URL=http://localhost:3000 # Generate with: openssl rand -hex 32 JWT_SECRET= # Session/cookie lifetime in milliseconds SESSION_TIME=3600000 # NEVER set to true when reachable by anyone but you: bypasses login # entirely with a fake dev session. ALLOW_DEV_AUTH=false # Set to true to run this instance as a read-only public demo: every # request other than GET/HEAD/OPTIONS and the login flow is rejected with # 403, and /register is blocked outright. Pair with a seeded demo account # and a scheduled reseed - see "Public read-only demo" in DEPLOYMENT.md. DEMO_MODE=false # Set to true to require admin approval for new accounts: registration # still succeeds, but the account is created disabled and can't log in # until an admin manually enables it (there's no in-app admin role/UI for # this - see "Approving a new registration" in DEPLOYMENT.md). Useful if # registration is reachable by more than just people you trust. REGISTRATION_REQUIRES_APPROVAL=false # Written inside the container; the app-logs volume in docker-compose.yml # persists it across restarts. Leave as-is unless you changed the volume. LOGGER_PATH=/app/logs # Verbose request tracing (raw SQL text, record names, usernames) written to # LOGGER_PATH via the debug log level. Off by default because this can # include personal data (borrower/customer/author names). Only turn this on # temporarily while troubleshooting, never leave it on in a production # deployment that stores real people's data. DEBUG_LOGGING=false # Optional: enables ISBN metadata lookup via Google Books instead of the # free Open Library fallback. GOOGLE_BOOKS_API_KEY= # Max size (in MB) accepted for a book's ebook file upload (.epub/.pdf/.mobi/.azw3). # Increase this if your library has large scanned PDFs or big ebook files. MAX_EBOOK_FILE_SIZE_MB=10 # Max size (in MB) accepted for a library import CSV (Goodreads export, or # Vaultisse's own template - see POST /import/library). MAX_IMPORT_FILE_SIZE_MB=10 # Set to true ONLY if a reverse proxy or tunnel (Cloudflare Tunnel, your # own Nginx/Caddy, ...) sits in front of this app and sets X-Forwarded-* # headers. It makes the login rate limiter key off the real client IP # instead of the proxy's. Leave false if the app's port is reachable # directly — enabling it without a real proxy in front lets anyone spoof # their IP and bypass rate limiting. TRUST_PROXY=false # --- Database --- # Consumed by the "db" service itself (docker-compose.yml). The "app" # service always connects to DB_HOST=db, DB_PORT=5432 on the compose # network — it ignores DB_HOST/DB_PORT set here. DB_NAME=paperbooks DB_USER=postgres DB_PASSWORD= # --- Cloudflare Tunnel (optional) --- # Only used if you start compose with the "cloudflare" profile — see # "Exposing it to the internet" in the README. Leave blank otherwise. CLOUDFLARE_TUNNEL_TOKEN=