pub struct PreviewSettings {Show 13 fields
pub enabled: bool,
pub branches: Vec<String>,
pub max: u32,
pub env: EnvFile,
pub inherit_env: bool,
pub domain: Option<String>,
pub port: Option<u16>,
pub replicas: u32,
pub resources: Option<Resources>,
pub ttl: Option<String>,
pub forks: bool,
pub fork_secrets: Vec<String>,
pub status: Option<StatusSettings>,
}Expand description
What an app sets for its previews.
Fields§
§enabled: bool§branches: Vec<String>Base branches whose pull requests get previews. Default: the app’s git ref.
max: u32At most this many previews at once (default 3); a pull request over the limit gets none until another closes.
env: EnvFileThe preview’s environment: .env text or a {KEY: value | {secret: NAME}} map, laid over the app’s when inherit_env.
inherit_env: boolStart from the app’s environment (default false: a preview gets only
env, so it never points at production’s database by accident).
domain: Option<String>auto (default: a generated sslip.io name) or *.<suffix> for
<app>-pr-<n>.<suffix>, within the org’s allowed domains.
port: Option<u16>The port to route to; default the app’s.
replicas: u32§resources: Option<Resources>Per replica; default the app’s.
ttl: Option<String>Remove a preview that has not been updated for this long (7d,
36h). Default: kept until its pull request closes.
forks: boolPreviews for pull requests from forks (default false). They build in a VM and get none of the app’s secrets.
fork_secrets: Vec<String>Secrets in env a fork’s preview may receive. Any other secret is
left out of a fork’s preview.
status: Option<StatusSettings>Post the preview’s state and URL as a commit status.