Files
Triple-C/app/src-tauri/src/models/container_config.rs
Josh Knapp 0f188783e1
All checks were successful
Build Container / build-container (push) Successful in 1m59s
Add container registry pull, image source settings, and global AWS config
Support pulling images from registry (default: repo.anhonesthost.net/cybercovellc/triple-c/triple-c-sandbox:latest),
local builds, or custom images via a new settings UI. Add global AWS configuration
(config path auto-detect, profile picker, region) that serves as defaults overridable
per-project for Bedrock auth.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 15:22:49 +00:00

32 lines
943 B
Rust

use serde::{Deserialize, Serialize};
use super::app_settings::ImageSource;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ContainerInfo {
pub container_id: String,
pub project_id: String,
pub status: String,
pub image: String,
}
pub const LOCAL_IMAGE_NAME: &str = "triple-c";
pub const IMAGE_TAG: &str = "latest";
pub const REGISTRY_IMAGE: &str = "repo.anhonesthost.net/cybercovellc/triple-c/triple-c-sandbox:latest";
pub fn local_build_image_name() -> String {
format!("{LOCAL_IMAGE_NAME}:{IMAGE_TAG}")
}
pub fn resolve_image_name(source: &ImageSource, custom: &Option<String>) -> String {
match source {
ImageSource::Registry => REGISTRY_IMAGE.to_string(),
ImageSource::LocalBuild => local_build_image_name(),
ImageSource::Custom => custom
.as_deref()
.filter(|s| !s.is_empty())
.unwrap_or(REGISTRY_IMAGE)
.to_string(),
}
}