Skip to main content

Module settings

Module settings 

Source
Expand description

User-configurable settings for pitchfork.

Settings can be configured in multiple ways (in order of precedence):

  1. Environment variables (highest priority)
  2. Project-level pitchfork.toml or pitchfork.local.toml (in [settings] section)
  3. User-level ~/.config/pitchfork/config.toml (in [settings] section)
  4. System-level /etc/pitchfork/config.toml (in [settings] section)
  5. Built-in defaults (lowest priority)

Example pitchfork.toml with settings:

[daemons.myapp]
run = "node server.js"

[settings.general]
autostop_delay = "5m"
log_level = "debug"

[settings.web]
auto_start = true

The structs below are the single declaration of every setting: #[derive(usage_rs::Config)] generates the usage-config registry, the reader that fills the structs from a resolution, and the spec config block that documents them (carried into pitchfork.usage.kdl through #[usage(config = ...)] on the CLI root). There is no settings.toml and no build-script generator left to keep in step with this file.

Resolution is usage-config’s single origin-tracked merge, so explicitly setting a value equal to the default in a higher-precedence file still overrides a lower one, and pitchfork settings renders provenance from the same merge that produced the values.

Structs§

Settings
Every setting pitchfork has.
SettingsApi
The api.* settings: the standalone API server (JSON REST endpoints for the Vue SPA). When api.auto_start is enabled and api.bind_port is set, the API server binds independently of the web UI.
SettingsApiPartial
Partial mirror of SettingsApi.
SettingsGeneral
The general.* settings.
SettingsGeneralPartial
Partial mirror of SettingsGeneral.
SettingsIpc
The ipc.* (inter-process communication) settings.
SettingsIpcPartial
Partial mirror of SettingsIpc.
SettingsLogs
The logs.* settings.
SettingsLogsArchiveHook
The logs.archive_hook.* settings.
SettingsLogsArchiveHookPartial
Partial mirror of SettingsLogsArchiveHook.
SettingsLogsPartial
Partial mirror of SettingsLogs.
SettingsPartial
Partial mirror of Settings, for [settings] tables in pitchfork.toml files.
SettingsProxy
The proxy.* settings.
SettingsProxyPartial
Partial mirror of SettingsProxy.
SettingsSupervisor
The supervisor.* settings.
SettingsSupervisorPartial
Partial mirror of SettingsSupervisor.
SettingsTui
The tui.* (terminal UI) settings.
SettingsTuiPartial
Partial mirror of SettingsTui.
SettingsWeb
The web.* (web UI) settings.
SettingsWebPartial
Partial mirror of SettingsWeb.

Functions§

reload_settings
Reload settings from config files.
resolve_shell
Resolve the shell for daemon run scripts, command probes and hooks from the global settings. See Settings::resolve_shell.
settings
Get the global settings instance