Skip to content

Environment Settings Reference

Every environment in BRIDGEPORT has per-environment settings organized into five modules: General, Monitoring, Operations, Data, and Configuration. Settings are created with defaults when an environment is created and can be adjusted in Environment Settings (admin only).

Environment settings allow you to configure each environment independently. For example, you might want:

  • More frequent health checks in production than in staging
  • Agent-based metrics in production, SSH-based in staging
  • Backup downloads enabled only in staging

Settings are managed through the UI at Environment > Settings (admin access required) or via the API.


All settings endpoints require admin authentication.

Get settings for a module:

Terminal window
GET /api/environments/:envId/settings/:module

Where :module is one of: general, monitoring, operations, data, configuration.

Update settings:

Terminal window
PATCH /api/environments/:envId/settings/:module
Content-Type: application/json
{
"sshUser": "deploy",
"enabled": true
}

Only include the fields you want to change. Unknown fields are rejected. Invalid values return a 400 error with details.

Reset to defaults:

Terminal window
POST /api/environments/:envId/settings/:module/reset

SSH and connectivity configuration.

SettingTypeDefaultDescription
sshUserstring"root"Default SSH username for connecting to servers in this environment

Per-metric collection toggles. The Monitoring tab now exposes only the collect* toggles below.

Monitoring cadence and retention are global, not per-environment. Earlier releases had per-environment monitoring fields (enabled, serverHealthIntervalMs, serviceHealthIntervalMs, discoveryIntervalMs, metricsIntervalMs, updateCheckIntervalMs, backupCheckIntervalMs, metricsRetentionDays, healthLogRetentionDays, bounceThreshold, bounceCooldownMs). These were silently ignored by the SSH scheduler and have been removed:

  • Collection cadence is set globally by the SCHEDULER_* environment variables — see Configuration Reference → Scheduler.
  • Retention (server/service metrics, health logs) is global — METRICS_RETENTION_DAYS (env var) and the System Settings retention knobs.
  • Alert bounce thresholds now live on Notification Types (Admin → Notifications), not per environment.
SettingTypeDefaultRangeDescription
collectCpubooleantrueCollect CPU usage metrics
collectMemorybooleantrueCollect memory usage metrics
collectSwapbooleantrueCollect swap usage metrics
collectDiskbooleantrueCollect disk usage metrics
collectLoadbooleantrueCollect system load averages
collectFdsbooleantrueCollect file descriptor counts
collectTcpbooleantrueCollect TCP connection metrics
collectProcessesbooleantrueCollect running process count
collectTcpChecksbooleantrueRun TCP connectivity checks on services
collectCertChecksbooleantrueCheck TLS certificate expiry on services

Defaults for new servers and environment-wide operational behavior.

SettingTypeDefaultOptionsDescription
defaultDockerModestring"ssh"ssh, socketDefault Docker daemon connection method for new servers
defaultMetricsModestring"disabled"disabled, ssh, agentDefault metrics collection mode for new servers
autoPruneImagesbooleanfalseRun docker image prune automatically after every deploy to the affected server, and weekly on all healthy servers in this environment
pruneImagesModestring"dangling"dangling, allWhich images are pruned. dangling removes only untagged layers (safe default). all removes any image not used by a running container, including rollback targets — use with care.
autoManageComposebooleanfalseWhen a deployment has no compose file path yet, let BRIDGEPORT set it to the generated compose file on first deploy. A compose path that is already set (by an operator, the API, or a previous import) is never overwritten regardless of this setting.

Compose path management (autoManageCompose). BRIDGEPORT never rewrites a deployment’s composePath once it is set. With this setting off (the default), a deployment whose composePath is still null is deployed by restarting its container directly rather than via a generated compose file — point it at a compose file manually (or enable this setting) to deploy through docker compose. With it on, the first deploy of a path-less deployment writes a generated compose file and records its path. Every automatic composePath change is written to the audit log with details.source (generator or terraform-import). Generated and template-authored compose files are validated before deploy: the compose document must define a service keyed exactly on the deployment’s containerName, otherwise the deploy is refused with an actionable error instead of failing mid-rollout. Shared compose files that back multiple deployments are validated against the file already on disk and are never rewritten.


Database backup and monitoring defaults.

SettingTypeDefaultDescription
allowBackupDownloadbooleanfalseAllow users to download database backups from the UI. Enable for development environments; disable in production for security.
SettingTypeDefaultRangeDescription
defaultMonitoringEnabledbooleanfalseEnable monitoring by default when adding new databases
defaultCollectionIntervalSecinteger300 (5 min)60 — 3,600Default metrics collection interval for new databases (seconds)

Security and config-scanner settings for this environment.

SettingTypeDefaultDescription
allowSecretRevealbooleantrueAllow users to reveal secret values in the UI. When disabled, secrets are write-only — users can set values but never view them.

Controls sensitivity of the config file scanner that detects hardcoded values and suggests promoting them to secrets or vars.

SettingTypeDefaultRangeDescription
scanMinLengthinteger61 — 100Minimum value length to consider. Shorter values are ignored.
scanEntropyThresholdinteger250 — 80Shannon entropy threshold stored as ×10 (25 = 2.5 bits/char). Values below this are filtered out as low-entropy.

Per-environment notification routing. Lives outside the module registry because the channel options are dynamic (Slack channels are defined in Admin > Slack). Configured under Settings > Notifications for each environment.

SettingTypeDefaultDescription
slackChannelIdstring | nullnull (inherit)This environment’s Slack channel. Used two ways: (1) for a type routed to more than one channel, the override collapses the fan-out and sends only to this channel (per-environment alert splitting); (2) for an unrouted type, it stands in for the global default. A type routed to exactly one channel is unaffected and reaches that channel from every environment. When null, notifications fall back to the global default channel (the one marked isDefault). See notifications guide → Per-Environment Channel Override.

API:

Terminal window
GET /api/environments/:envId/settings/notifications
PATCH /api/environments/:envId/settings/notifications # { "slackChannelId": "<id>" | null }
POST /api/environments/:envId/settings/notifications/test

GET returns { settings, channels, defaultChannel }channels is the list of enabled Slack channels (so the UI can render a dropdown), and defaultChannel is the global default (so the UI can show “Inherits default: #channel-name”). The test endpoint sends a Slack test message through the resolved channel (override if set, otherwise the global default).