# Copy this file to .env and uncomment only the overrides you need.
# Precedence: defaults < config/*.toml < .env < process environment.
# Keep credentials in .env or your deployment environment, never in this example.
# Application
APP_ENVIRONMENT=development
APP_HOST=127.0.0.1
APP_PORT=8000
# APP_NAME="{{name}}"
# Public application URL for generated links; production mail requires HTTPS.
# For React development, use the frontend URL (http://localhost:5173).
# APP_URL=http://localhost:8000
# Database (SQLite works without an external server)
DATABASE_URL=sqlite://database/app.sqlite?mode=rwc
# PostgreSQL (create the database first):
# DATABASE_URL=postgres://postgres:postgres@localhost/{{crate}}
# DATABASE_MAX_CONNECTIONS=10
# DATABASE_MIN_CONNECTIONS=0
# DATABASE_CONNECT_TIMEOUT_SECONDS=10
# DATABASE_ACQUIRE_TIMEOUT_SECONDS=10
# DATABASE_IDLE_TIMEOUT_SECONDS=600
# Server (SERVER_HOST and SERVER_PORT override APP_HOST and APP_PORT)
# SERVER_HOST=127.0.0.1
# SERVER_PORT=8000
# SERVER_SHUTDOWN_TIMEOUT_SECONDS=10
# HTTP (timeouts in seconds, body size in bytes)
# Set HTTP_REQUEST_TIMEOUT_SECONDS=0 to disable the response-header deadline.
# HTTP_REQUEST_TIMEOUT_SECONDS=30
# HTTP_READINESS_TIMEOUT_SECONDS=2
# HTTP_MAX_BODY_BYTES=2097152
# HTTP_COMPRESSION=true
# API contracts
# API_TITLE="{{name}} API"
# API_VERSION=1.0.0
# API_OPENAPI=false
# API_DOCS=false
# API_DOCS enables /docs/api and its schema only in development/test.
# API_OPENAPI explicitly exposes /openapi.json, including in production.
# Authentication (optional: capy make:auth, then capy migrate)
# AUTH_SESSION_LIFETIME_SECONDS=2592000
# AUTH_PASSWORD_RESET_LIFETIME_SECONDS=1800
# AUTH_SAME_SITE=lax
# Leave the cookie name and Secure policy unset to follow the environment:
# session/false on local HTTP, __Host-session/true in production.
# Explicit Secure cookies require HTTPS; production rejects AUTH_SECURE=false.
# AUTH_COOKIE_NAME=__Host-session
# AUTH_SECURE=true
# Background jobs (optional: capy make:job GenerateReport, then capy migrate)
# Run workers separately with capy queue:work.
# SQLite requires concurrency 1. PostgreSQL concurrency must be smaller than
# DATABASE_MAX_CONNECTIONS, leaving connections for claims and heartbeats.
# JOBS_CONCURRENCY=1
# JOBS_POLL_INTERVAL_MS=1000
# JOBS_LEASE_SECONDS=60
# JOBS_SHUTDOWN_TIMEOUT_SECONDS=30
# Mail and notifications (optional: capy make:mail WelcomeMail or
# capy make:notification WelcomeNotification)
# log emits metadata only in development; smtp sends real email.
# Production requires smtp, TLS, a real sender address, and an HTTPS APP_URL.
# MAIL_DRIVER=log
# MAIL_FROM_ADDRESS=hello@localhost.test
# MAIL_FROM_NAME="Capy"
# MAIL_TIMEOUT_SECONDS=15
# MAIL_MAX_MESSAGE_BYTES=10485760
# MAIL_QUEUE=mail
# Queued delivery also requires Jobs; synchronous delivery does not.
# SMTP (used by MAIL_DRIVER=smtp)
# MAIL_SMTP_HOST=localhost
# MAIL_SMTP_PORT=587
# MAIL_SMTP_ENCRYPTION=starttls
# Encryption: starttls (usually 587), tls (usually 465), or none (local dev only).
# For local Mailpit, use port 1025 and encryption none without credentials.
# Set username and password together in .env or your deployment environment.
# SMTP authentication requires TLS, including in development.
# MAIL_SMTP_USERNAME=
# MAIL_SMTP_PASSWORD=
# Process environment only: these are NOT loaded from the application's .env.
# Export them in your shell or set them when launching capy/the application.
# Example: RUST_LOG=info CAPY_FRONTEND_PORT=5173 capy dev
# RUST_LOG=info
# CAPY_FRONTEND_PORT=5173
# CAPY_FRONTEND_PORT applies only to the React development server.