feat: add compose exec and compose bash commands

Exec is new command scoped under compose. It allows sending commands
directly into appserver container. I will make this
customizable/controllable in the future.
This commit is contained in:
2023-06-15 19:57:02 +02:00
parent 7bf76d3ff2
commit b45cfd3e0a
5 changed files with 29 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ pub enum Django {
/// Run Django's manage.py shell.
Shell,
/// Run Django's manage.py test.
Test,
}

View File

@@ -5,12 +5,21 @@ use clap::Subcommand;
/// Wraper for docker compose; autodiscover compose file and source .env file.
#[derive(Subcommand, Debug)]
pub enum DockerCompose {
/// Start bash session inside container
Bash,
/// Build containers.
Build,
/// Down containers.
Down,
/// Exec command inside container.
Exec {
#[arg(value_enum)]
rest: Vec<String>,
},
/// Stop, build and start containers.
Rebuild,