2023-05-21 22:35:12 +02:00
|
|
|
use clap::Subcommand;
|
|
|
|
|
2023-05-23 23:43:52 +02:00
|
|
|
// TODO: (matej) add Exec, Bash
|
|
|
|
|
2023-05-21 22:35:12 +02:00
|
|
|
/// Wraper for docker compose; autodiscover compose file and source .env file.
|
|
|
|
#[derive(Subcommand, Debug)]
|
|
|
|
pub enum DockerCompose {
|
2023-06-15 19:57:02 +02:00
|
|
|
/// Start bash session inside container
|
|
|
|
Bash,
|
|
|
|
|
2023-05-21 22:35:12 +02:00
|
|
|
/// Build containers.
|
|
|
|
Build,
|
|
|
|
|
|
|
|
/// Down containers.
|
|
|
|
Down,
|
|
|
|
|
2023-06-15 19:57:02 +02:00
|
|
|
/// Exec command inside container.
|
|
|
|
Exec {
|
|
|
|
#[arg(value_enum)]
|
|
|
|
rest: Vec<String>,
|
|
|
|
},
|
|
|
|
|
2023-05-21 22:35:12 +02:00
|
|
|
/// Stop, build and start containers.
|
|
|
|
Rebuild,
|
|
|
|
|
|
|
|
/// Stop and start containers.
|
|
|
|
Restart,
|
|
|
|
|
|
|
|
/// Start containers.
|
|
|
|
Start,
|
|
|
|
|
|
|
|
/// Stop containers.
|
|
|
|
Stop,
|
|
|
|
|
|
|
|
/// Up containers.
|
|
|
|
Up,
|
|
|
|
}
|