pub struct ComposeUpCommand { /* private fields */ }
Expand description
Docker Compose up command builder
Implementations§
Source§impl ComposeUpCommand
impl ComposeUpCommand
Sourcepub fn with_config(config: ComposeConfig) -> Self
pub fn with_config(config: ComposeConfig) -> Self
Create with a specific compose configuration
Sourcepub fn force_recreate(self) -> Self
pub fn force_recreate(self) -> Self
Force recreate containers
Sourcepub fn always_recreate_deps(self) -> Self
pub fn always_recreate_deps(self) -> Self
Always recreate dependent containers
Sourcepub fn no_recreate(self) -> Self
pub fn no_recreate(self) -> Self
Don’t recreate containers
Sourcepub fn remove_orphans(self) -> Self
pub fn remove_orphans(self) -> Self
Remove orphan containers
Sourcepub fn scale(self, service: impl Into<String>, instances: u32) -> Self
pub fn scale(self, service: impl Into<String>, instances: u32) -> Self
Scale a service to a specific number of instances
Sourcepub fn exit_code_from(self, service: impl Into<String>) -> Self
pub fn exit_code_from(self, service: impl Into<String>) -> Self
Use exit code from specific container
Sourcepub fn abort_on_container_exit(self) -> Self
pub fn abort_on_container_exit(self) -> Self
Abort when containers stop
Sourcepub fn attach_dependencies(self) -> Self
pub fn attach_dependencies(self) -> Self
Attach to dependent containers
Sourcepub fn renew_anon_volumes(self) -> Self
pub fn renew_anon_volumes(self) -> Self
Recreate anonymous volumes
Sourcepub fn wait_timeout(self, timeout: Duration) -> Self
pub fn wait_timeout(self, timeout: Duration) -> Self
Set maximum wait timeout
Sourcepub fn pull(self, policy: PullPolicy) -> Self
pub fn pull(self, policy: PullPolicy) -> Self
Set pull policy
Sourcepub fn project_name(self, name: impl Into<String>) -> Self
pub fn project_name(self, name: impl Into<String>) -> Self
Set project name
Sourcepub async fn run(&self) -> Result<ComposeUpResult>
pub async fn run(&self) -> Result<ComposeUpResult>
Execute the compose up command
§Errors
Returns an error if:
- Docker Compose is not installed
- Compose file is not found or invalid
- Service configuration errors
- Container creation/start fails
Trait Implementations§
Source§impl Clone for ComposeUpCommand
impl Clone for ComposeUpCommand
Source§fn clone(&self) -> ComposeUpCommand
fn clone(&self) -> ComposeUpCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl ComposeCommand for ComposeUpCommand
impl ComposeCommand for ComposeUpCommand
Source§type Output = ComposeOutput
type Output = ComposeOutput
The output type this command produces
Source§fn subcommand(&self) -> &'static str
fn subcommand(&self) -> &'static str
Get the compose subcommand name (e.g., “up”, “down”, “ps”)
Source§fn build_args(&self) -> Vec<String>
fn build_args(&self) -> Vec<String>
Build command-specific arguments
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the command
Source§fn config(&self) -> &ComposeConfig
fn config(&self) -> &ComposeConfig
Get the compose configuration
Source§impl Debug for ComposeUpCommand
impl Debug for ComposeUpCommand
Auto Trait Implementations§
impl Freeze for ComposeUpCommand
impl RefUnwindSafe for ComposeUpCommand
impl Send for ComposeUpCommand
impl Sync for ComposeUpCommand
impl Unpin for ComposeUpCommand
impl UnwindSafe for ComposeUpCommand
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
Mutably borrows from an owned value. Read more