askrobots / dbbasic-object-server
Public
Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.
danq9
signup: the person chooses the password and name on the confirm page
83c7aa6
2 weeks, 5 days ago
History
.env.example · 4.1 KB · 90 lines
| 1 | # DBBASIC Object Server — Docker / Coolify environment. |
| 2 | # |
| 3 | # Copy this file to `.env` (git-ignored -- see .gitignore) next to |
| 4 | # docker-compose.yml, and fill in real values there. Never commit a real |
| 5 | # `.env`. For Coolify, paste these same variables into its environment |
| 6 | # variables UI instead of using this file directly. |
| 7 | # |
| 8 | # These are the same conservative, closed-by-default settings |
| 9 | # scripts/install.sh writes into /etc/dbbasic-object-server.env for the |
| 10 | # bare-VM path. See docs/docker-deployment.md and |
| 11 | # docs/single-vm-deployment.md for what each flag does and when to flip it. |
| 12 | |
| 13 | # --- State paths ------------------------------------------------------- |
| 14 | # Already set inside the image (see Dockerfile) to match the volume mounts |
| 15 | # in docker-compose.yml. Leave these unset unless you also change the |
| 16 | # volume mount paths to match -- overriding one without the other breaks |
| 17 | # persistence. |
| 18 | # DBBASIC_OBJECTS_DIR=/data/objects |
| 19 | # DBBASIC_DATA_DIR=/data/state |
| 20 | # DBBASIC_PACKAGES_DIR=/opt/dbbasic-object-server/packages |
| 21 | # DBBASIC_BACKUPS_DIR=/data/state/backups |
| 22 | |
| 23 | # --- Admin token ----------------------------------------------------------- |
| 24 | # Leave unset to let the container generate one on first boot, print it once |
| 25 | # to `docker compose logs` / your platform's log viewer, and persist it |
| 26 | # under the data volume (see docs/docker-deployment.md's first-boot |
| 27 | # section). Set it explicitly here for Coolify-style deployments where |
| 28 | # environment variables are managed through a UI and you want a stable, |
| 29 | # known token instead of reading it out of logs after first boot. |
| 30 | # DBBASIC_ADMIN_TOKEN=replace-with-a-generated-token |
| 31 | |
| 32 | # --- Write gates -- closed by default --------------------------------- |
| 33 | # Turn these on deliberately, after login, backups, and proxy access are |
| 34 | # confirmed working. See docs/single-vm-deployment.md. |
| 35 | DBBASIC_ENABLE_SOURCE_WRITES=false |
| 36 | DBBASIC_ENABLE_FILE_WRITES=false |
| 37 | DBBASIC_ENABLE_PACKAGE_INSTALLS=false |
| 38 | DBBASIC_ENABLE_PACKAGE_RESTORE=false |
| 39 | |
| 40 | # --- Login ------------------------------------------------------------- |
| 41 | # Password login stays off until a first admin user exists. See |
| 42 | # docs/docker-deployment.md's first-boot section and |
| 43 | # docs/single-vm-deployment.md#bootstrap-browser-login. |
| 44 | DBBASIC_ENABLE_PASSWORD_LOGIN=false |
| 45 | |
| 46 | # Self-service signup and password reset (docs/http-api-contract.md, |
| 47 | # Self-Service Signup). Signup refuses to turn on until enforcement is on, |
| 48 | # no rule gives every signed-in user unscoped access, and email can go out. |
| 49 | DBBASIC_ENABLE_SIGNUP=false |
| 50 | DBBASIC_ENABLE_PASSWORD_RESET=false |
| 51 | # This server's https address; emailed links are built from it. |
| 52 | DBBASIC_PUBLIC_URL= |
| 53 | # Outbound email for those links: disabled | log | live (live needs a host). |
| 54 | DBBASIC_SMTP_MODE=disabled |
| 55 | DBBASIC_SMTP_HOST= |
| 56 | DBBASIC_SMTP_FROM= |
| 57 | |
| 58 | # Clean page URLs (/notes, /tasks): site routing must be on for any app |
| 59 | # page to serve at all. Off only for API-only deployments. |
| 60 | DBBASIC_ENABLE_SITE_ROUTES=true |
| 61 | # Keep true behind HTTPS -- Coolify's proxy (or your own) terminates TLS in |
| 62 | # front of this container. Set to false only for plain-HTTP local |
| 63 | # development. |
| 64 | DBBASIC_COOKIE_SECURE=true |
| 65 | |
| 66 | # --- Permissions -- start open, move to audit, then enforcement ------------ |
| 67 | DBBASIC_ENABLE_PERMISSION_AUDIT=false |
| 68 | DBBASIC_ENABLE_PERMISSION_ENFORCEMENT=false |
| 69 | |
| 70 | # --- Traffic and safety limits ------------------------------------------- |
| 71 | DBBASIC_MAX_REQUEST_BYTES=1048576 |
| 72 | DBBASIC_MAX_CONCURRENT_REQUESTS=64 |
| 73 | DBBASIC_MAX_CONCURRENT_EXECUTIONS=8 |
| 74 | DBBASIC_OBJECT_TIMEOUT_SECONDS=5 |
| 75 | DBBASIC_RATE_LIMIT_REQUESTS=1000 |
| 76 | DBBASIC_RATE_LIMIT_WINDOW_SECONDS=60 |
| 77 | # Only appropriate when a trusted reverse proxy (Coolify's own proxy, or one |
| 78 | # you run yourself) sits directly in front of this container and |
| 79 | # strips/sets these headers itself -- the same assumption |
| 80 | # docs/single-vm-deployment.md makes about Caddy in front of uvicorn on the |
| 81 | # bare-VM path. |
| 82 | DBBASIC_RATE_LIMIT_TRUST_PROXY_HEADERS=true |
| 83 | DBBASIC_LOGIN_LOCKOUT_ATTEMPTS=5 |
| 84 | DBBASIC_LOGIN_LOCKOUT_WINDOW_SECONDS=900 |
| 85 | |
| 86 | # --- Realtime ------------------------------------------------------------ |
| 87 | # Requires the `websockets` package, which ships in the image's `server` |
| 88 | # extra (see pyproject.toml) -- plain uvicorn rejects the /ws upgrade |
| 89 | # without it. |
| 90 | DBBASIC_ENABLE_REALTIME=true |