pub struct StackConfig {Show 22 fields
pub server_id: String,
pub project_name: String,
pub run_directory: String,
pub file_paths: Vec<String>,
pub files_on_host: bool,
pub registry_provider: String,
pub registry_account: String,
pub extra_args: Vec<String>,
pub environment: Vec<EnvironmentVar>,
pub env_file_path: String,
pub skip_secret_interp: bool,
pub file_contents: String,
pub ignore_services: Vec<String>,
pub git_provider: String,
pub git_https: bool,
pub git_account: String,
pub repo: String,
pub branch: String,
pub commit: String,
pub webhook_enabled: bool,
pub webhook_secret: String,
pub send_alerts: bool,
}Expand description
The compose file configuration.
Fields§
§server_id: StringThe server to deploy the stack on.
project_name: StringOptionally specify a custom project name for the stack.
If this is empty string, it will default to the stack name.
Used with docker compose -p {project_name}.
Note. Can be used to import pre-existing stacks.
run_directory: StringDirectory to change to (cd) before running docker compose up -d.
Default: ./ (the repo root)
file_paths: Vec<String>Add paths to compose files, relative to the run path.
If this is empty, will use file compose.yaml.
files_on_host: boolIf this is checked, the stack will source the files on the host.
Use run_directory and file_paths to specify the path on the host.
This is useful for those who wish to setup their files on the host using SSH or similar,
rather than defining the contents in UI or in a git repo.
registry_provider: StringUsed with registry_account to login to a registry before docker compose up.
registry_account: StringUsed with registry_provider to login to a registry before docker compose up.
extra_args: Vec<String>The extra arguments to pass after docker compose up -d.
If empty, no extra arguments will be passed.
environment: Vec<EnvironmentVar>The environment variables passed to the compose file. They will be written to path defined in env_file_path, which is given relative to the run directory.
If it is empty, no file will be written.
env_file_path: StringThe name of the written environment file before docker compose up.
Relative to the repo root.
Default: .env
skip_secret_interp: boolWhether to skip secret interpolation into the stack environment variables.
file_contents: StringThe contents of the file directly, for management in the UI. If this is empty, it will fall back to checking git config for repo based compose file.
ignore_services: Vec<String>Ignore certain services declared in the compose file when checking
the stack status. For example, an init service might be exited, but the
stack should be healthy. This init service should be in ignore_services
git_provider: StringThe git provider domain. Default: github.com
git_https: boolWhether to use https to clone the repo (versus http). Default: true
Note. Monitor does not currently support cloning repos via ssh.
git_account: StringThe git account used to access private repos. Passing empty string can only clone public repos.
Note. A token for the account must be available in the core config or the builder server’s periphery config for the configured git provider.
repo: StringThe Github repo used as the source of the build.
branch: StringThe branch of the repo.
commit: StringOptionally set a specific commit hash.
webhook_enabled: boolWhether incoming webhooks actually trigger action.
webhook_secret: StringOptionally provide an alternate webhook secret for this stack. If its an empty string, use the default secret from the config.
send_alerts: boolWhether to send StackStateChange alerts for this stack.
Implementations§
Source§impl StackConfig
impl StackConfig
pub fn builder() -> StackConfigBuilder
Trait Implementations§
Source§impl Clone for StackConfig
impl Clone for StackConfig
Source§fn clone(&self) -> StackConfig
fn clone(&self) -> StackConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StackConfig
impl Debug for StackConfig
Source§impl Default for StackConfig
impl Default for StackConfig
Source§impl<'de> Deserialize<'de> for StackConfig
impl<'de> Deserialize<'de> for StackConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<PartialStackConfig> for StackConfig
impl From<PartialStackConfig> for StackConfig
Source§fn from(value: PartialStackConfig) -> StackConfig
fn from(value: PartialStackConfig) -> StackConfig
Source§impl From<StackConfig> for PartialStackConfig
impl From<StackConfig> for PartialStackConfig
Source§fn from(value: StackConfig) -> PartialStackConfig
fn from(value: StackConfig) -> PartialStackConfig
Source§impl HasPartial for StackConfig
impl HasPartial for StackConfig
type Partial = PartialStackConfig
fn merge_partial(self, partial: Self::Partial) -> StackConfig
Source§impl PartialDiff<PartialStackConfig, StackConfigDiff> for StackConfig
impl PartialDiff<PartialStackConfig, StackConfigDiff> for StackConfig
Source§fn partial_diff(&self, partial: PartialStackConfig) -> StackConfigDiff
fn partial_diff(&self, partial: PartialStackConfig) -> StackConfigDiff
fn minimize_partial(&self, partial: P) -> P
Auto Trait Implementations§
impl Freeze for StackConfig
impl RefUnwindSafe for StackConfig
impl Send for StackConfig
impl Sync for StackConfig
impl Unpin for StackConfig
impl UnwindSafe for StackConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.