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:
@@ -11,6 +11,13 @@ pub fn down() -> Result<()> {
|
||||
CommandBuilder::docker_compose().args("down").exec()
|
||||
}
|
||||
|
||||
pub fn exec(rest: &[String]) -> Result<()> {
|
||||
CommandBuilder::docker_compose()
|
||||
.args("exec appserver")
|
||||
.args(rest)
|
||||
.exec()
|
||||
}
|
||||
|
||||
/// Start containers via `docker compose start`. Optionally pass containers to be started.
|
||||
/// ```
|
||||
/// start(None);
|
||||
@@ -31,6 +38,10 @@ pub fn up() -> Result<()> {
|
||||
}
|
||||
|
||||
// shortcuts
|
||||
pub fn bash() -> Result<()> {
|
||||
exec(&["bash".to_string()])
|
||||
}
|
||||
|
||||
pub fn rebuild() -> Result<()> {
|
||||
stop()?;
|
||||
build()?;
|
||||
|
Reference in New Issue
Block a user