Skip to content

Make the disk headroom thresholds overridable by environment variable #47

Description

@wiverson

#4 gives the server fixed thresholds for disk headroom: it warns when the data volume has under 100 MB free and calls it critical under 50 MB, and a write that would leave less than the reserve (the larger of 50 MB and the index database's own size) is refused. Those numbers suit a markdown vault on a Railway volume, which is what this server is for.

If anyone runs it somewhere the numbers are wrong — a very large attachment-heavy vault, or a host where 100 MB is nothing — the fix is two environment variables, say DISK_WARN_BYTES and DISK_CRITICAL_BYTES, read at boot with the defaults above. Not doing it until someone asks: an override nobody uses is a setting to document and test forever.

Refs #4.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions