stop container before updating

This commit is contained in:
Aiden McClelland
2020-12-02 16:22:05 -07:00
committed by Keagan McClelland
parent 0dee648078
commit 71a3728fbb

View File

@@ -15,11 +15,16 @@ impl VersionT for Version {
} }
async fn up(&self) -> Result<(), Error> { async fn up(&self) -> Result<(), Error> {
for (app_id, _) in crate::apps::list_info().await? { for (app_id, _) in crate::apps::list_info().await? {
tokio::process::Command::new("docker")
.arg("stop")
.arg(&app_id)
.invoke("Docker")
.await?;
tokio::process::Command::new("docker") tokio::process::Command::new("docker")
.arg("update") .arg("update")
.arg("--restart") .arg("--restart")
.arg("no") .arg("no")
.arg(app_id) .arg(&app_id)
.invoke("Docker") .invoke("Docker")
.await?; .await?;
} }