mirror of
https://github.com/moghtech/komodo.git
synced 2026-03-12 10:33:16 -05:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2463ed3879 | ||
|
|
a2758ce6f4 | ||
|
|
3f1788dbbb | ||
|
|
33a0560af6 | ||
|
|
610a10c488 |
24
Cargo.lock
generated
24
Cargo.lock
generated
@@ -41,7 +41,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "alerter"
|
||||
version = "1.13.3"
|
||||
version = "1.13.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
@@ -922,7 +922,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "command"
|
||||
version = "1.13.3"
|
||||
version = "1.13.4"
|
||||
dependencies = [
|
||||
"monitor_client",
|
||||
"run_command",
|
||||
@@ -1306,7 +1306,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "formatting"
|
||||
version = "1.13.3"
|
||||
version = "1.13.4"
|
||||
dependencies = [
|
||||
"serror",
|
||||
]
|
||||
@@ -1437,7 +1437,7 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
|
||||
|
||||
[[package]]
|
||||
name = "git"
|
||||
version = "1.13.3"
|
||||
version = "1.13.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"command",
|
||||
@@ -2041,7 +2041,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "logger"
|
||||
version = "1.13.3"
|
||||
version = "1.13.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"monitor_client",
|
||||
@@ -2111,7 +2111,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "migrator"
|
||||
version = "1.13.3"
|
||||
version = "1.13.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
@@ -2246,7 +2246,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "monitor_cli"
|
||||
version = "1.13.3"
|
||||
version = "1.13.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@@ -2262,7 +2262,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "monitor_client"
|
||||
version = "1.13.3"
|
||||
version = "1.13.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async_timing_util",
|
||||
@@ -2294,7 +2294,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "monitor_core"
|
||||
version = "1.13.3"
|
||||
version = "1.13.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async_timing_util",
|
||||
@@ -2349,7 +2349,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "monitor_periphery"
|
||||
version = "1.13.3"
|
||||
version = "1.13.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async_timing_util",
|
||||
@@ -2773,7 +2773,7 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
|
||||
|
||||
[[package]]
|
||||
name = "periphery_client"
|
||||
version = "1.13.3"
|
||||
version = "1.13.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"monitor_client",
|
||||
@@ -4507,7 +4507,7 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
|
||||
|
||||
[[package]]
|
||||
name = "update_logger"
|
||||
version = "1.13.3"
|
||||
version = "1.13.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"logger",
|
||||
|
||||
@@ -3,7 +3,7 @@ resolver = "2"
|
||||
members = ["bin/*", "lib/*", "client/core/rs", "client/periphery/rs"]
|
||||
|
||||
[workspace.package]
|
||||
version = "1.13.3"
|
||||
version = "1.13.4"
|
||||
edition = "2021"
|
||||
authors = ["mbecker20 <becker.maxh@gmail.com>"]
|
||||
license = "GPL-3.0-or-later"
|
||||
|
||||
@@ -122,22 +122,6 @@ pub async fn compose_up(
|
||||
let last_project_name = stack.project_name(false);
|
||||
let project_name = stack.project_name(true);
|
||||
|
||||
// Pull images before destroying to minimize downtime.
|
||||
// If this fails, do not continue.
|
||||
let log = run_monitor_command(
|
||||
"compose pull",
|
||||
format!(
|
||||
"cd {run_dir} && {docker_compose} -p {project_name} -f {file_args} pull{service_arg}",
|
||||
),
|
||||
)
|
||||
.await;
|
||||
if !log.success {
|
||||
res.logs.push(log);
|
||||
return Err(anyhow!(
|
||||
"Failed to pull required images, stopping the run."
|
||||
));
|
||||
}
|
||||
|
||||
// Login to the registry to pull private images, if account is set
|
||||
if !stack.config.registry_account.is_empty() {
|
||||
let registry = ImageRegistry::Standard(StandardRegistryConfig {
|
||||
@@ -157,6 +141,22 @@ pub async fn compose_up(
|
||||
.context("failed to login to image registry")?;
|
||||
}
|
||||
|
||||
// Pull images before destroying to minimize downtime.
|
||||
// If this fails, do not continue.
|
||||
let log = run_monitor_command(
|
||||
"compose pull",
|
||||
format!(
|
||||
"cd {run_dir} && {docker_compose} -p {project_name} -f {file_args} pull{service_arg}",
|
||||
),
|
||||
)
|
||||
.await;
|
||||
if !log.success {
|
||||
res.logs.push(log);
|
||||
return Err(anyhow!(
|
||||
"Failed to pull required images, stopping the run."
|
||||
));
|
||||
}
|
||||
|
||||
// Take down the existing containers.
|
||||
// This one tries to use the previously deployed service name, to ensure the right stack is taken down.
|
||||
destroy_existing_containers(&last_project_name, service, res)
|
||||
|
||||
@@ -43,8 +43,8 @@ services:
|
||||
image: ghcr.io/mbecker20/periphery:latest # use ghcr.io/mbecker20/periphery:latest-aarch64 for arm support
|
||||
logging:
|
||||
driver: local
|
||||
ports:
|
||||
- 8120:8120
|
||||
ports:
|
||||
- 8120:8120
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- monitor-repos:/etc/monitor/repos # manage repos in a docker volume, or change it to an accessible host directory.
|
||||
|
||||
@@ -284,7 +284,7 @@ export const StackConfig = ({
|
||||
description:
|
||||
"If your compose file has init services that exit early, ignore them here so your stack will report the correct health.",
|
||||
contentHidden:
|
||||
((update.extra_args ?? config.extra_args)?.length ?? 0) === 0,
|
||||
((update.ignore_services ?? config.ignore_services)?.length ?? 0) === 0,
|
||||
actions: !disabled && (
|
||||
<Button
|
||||
variant="secondary"
|
||||
|
||||
@@ -135,7 +135,7 @@ export const StackComponents: RequiredResourceComponents = {
|
||||
State: ({ id }) => {
|
||||
const state = useStack(id)?.info.state ?? Types.StackState.Unknown;
|
||||
const config = useFullStack(id)?.config;
|
||||
if (!config?.file_contents && !config?.repo) {
|
||||
if (!config?.files_on_host && !config?.file_contents && !config?.repo) {
|
||||
return null;
|
||||
}
|
||||
return <StatusBadge text={state} intent={stack_state_intention(state)} />;
|
||||
|
||||
Reference in New Issue
Block a user