# DBBASIC Object Server — Docker / Coolify environment. # # Copy this file to `.env` (git-ignored -- see .gitignore) next to # docker-compose.yml, and fill in real values there. Never commit a real # `.env`. For Coolify, paste these same variables into its environment # variables UI instead of using this file directly. # # These are the same conservative, closed-by-default settings # scripts/install.sh writes into /etc/dbbasic-object-server.env for the # bare-VM path. See docs/docker-deployment.md and # docs/single-vm-deployment.md for what each flag does and when to flip it. # --- State paths ------------------------------------------------------- # Already set inside the image (see Dockerfile) to match the volume mounts # in docker-compose.yml. Leave these unset unless you also change the # volume mount paths to match -- overriding one without the other breaks # persistence. # DBBASIC_OBJECTS_DIR=/data/objects # DBBASIC_DATA_DIR=/data/state # DBBASIC_PACKAGES_DIR=/opt/dbbasic-object-server/packages # DBBASIC_BACKUPS_DIR=/data/state/backups # --- Admin token ----------------------------------------------------------- # Leave unset to let the container generate one on first boot, print it once # to `docker compose logs` / your platform's log viewer, and persist it # under the data volume (see docs/docker-deployment.md's first-boot # section). Set it explicitly here for Coolify-style deployments where # environment variables are managed through a UI and you want a stable, # known token instead of reading it out of logs after first boot. # DBBASIC_ADMIN_TOKEN=replace-with-a-generated-token # --- Write gates -- closed by default --------------------------------- # Turn these on deliberately, after login, backups, and proxy access are # confirmed working. See docs/single-vm-deployment.md. DBBASIC_ENABLE_SOURCE_WRITES=false DBBASIC_ENABLE_FILE_WRITES=false DBBASIC_ENABLE_PACKAGE_INSTALLS=false DBBASIC_ENABLE_PACKAGE_RESTORE=false # --- Login ------------------------------------------------------------- # Password login stays off until a first admin user exists. See # docs/docker-deployment.md's first-boot section and # docs/single-vm-deployment.md#bootstrap-browser-login. DBBASIC_ENABLE_PASSWORD_LOGIN=false # Self-service signup and password reset (docs/http-api-contract.md, # Self-Service Signup). Signup refuses to turn on until enforcement is on, # no rule gives every signed-in user unscoped access, and email can go out. DBBASIC_ENABLE_SIGNUP=false DBBASIC_ENABLE_PASSWORD_RESET=false # This server's https address; emailed links are built from it. DBBASIC_PUBLIC_URL= # Outbound email for those links: disabled | log | live (live needs a host). DBBASIC_SMTP_MODE=disabled DBBASIC_SMTP_HOST= DBBASIC_SMTP_FROM= # Clean page URLs (/notes, /tasks): site routing must be on for any app # page to serve at all. Off only for API-only deployments. DBBASIC_ENABLE_SITE_ROUTES=true # Keep true behind HTTPS -- Coolify's proxy (or your own) terminates TLS in # front of this container. Set to false only for plain-HTTP local # development. DBBASIC_COOKIE_SECURE=true # --- Permissions -- start open, move to audit, then enforcement ------------ DBBASIC_ENABLE_PERMISSION_AUDIT=false DBBASIC_ENABLE_PERMISSION_ENFORCEMENT=false # --- Traffic and safety limits ------------------------------------------- DBBASIC_MAX_REQUEST_BYTES=1048576 DBBASIC_MAX_CONCURRENT_REQUESTS=64 DBBASIC_MAX_CONCURRENT_EXECUTIONS=8 DBBASIC_OBJECT_TIMEOUT_SECONDS=5 DBBASIC_RATE_LIMIT_REQUESTS=1000 DBBASIC_RATE_LIMIT_WINDOW_SECONDS=60 # Only appropriate when a trusted reverse proxy (Coolify's own proxy, or one # you run yourself) sits directly in front of this container and # strips/sets these headers itself -- the same assumption # docs/single-vm-deployment.md makes about Caddy in front of uvicorn on the # bare-VM path. DBBASIC_RATE_LIMIT_TRUST_PROXY_HEADERS=true DBBASIC_LOGIN_LOCKOUT_ATTEMPTS=5 DBBASIC_LOGIN_LOCKOUT_WINDOW_SECONDS=900 # --- Realtime ------------------------------------------------------------ # Requires the `websockets` package, which ships in the image's `server` # extra (see pyproject.toml) -- plain uvicorn rejects the /ws upgrade # without it. DBBASIC_ENABLE_REALTIME=true