mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-04 01:24:09 +02:00
container management 101
This commit is contained in:
parent
afb7d0ae6f
commit
e939a8fffb
3 changed files with 179 additions and 37 deletions
23
src/main.rs
23
src/main.rs
|
|
@ -1,15 +1,26 @@
|
|||
use crate::cloud::{parse, Cloud, CloudOptions};
|
||||
use crate::config::HazeConfig;
|
||||
use camino::Utf8Path;
|
||||
use color_eyre::{eyre::WrapErr, Report, Result};
|
||||
use std::fs::create_dir_all;
|
||||
use bollard::Docker;
|
||||
use color_eyre::{eyre::WrapErr, Result};
|
||||
|
||||
mod cloud;
|
||||
mod config;
|
||||
mod docker;
|
||||
|
||||
fn main() {
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
let mut docker =
|
||||
Docker::connect_with_local_defaults().wrap_err("Failed to connect to docker")?;
|
||||
let config = HazeConfig {
|
||||
sources_root: "/srv/http/owncloud".into(),
|
||||
work_dir: "/tmp/oc-docket".into(),
|
||||
work_dir: "/tmp/haze".into(),
|
||||
};
|
||||
let options = CloudOptions::default();
|
||||
|
||||
// let cloud = Cloud::create(&mut docker, options, &config).await?;
|
||||
// println!("{} running on http://{}", cloud.id, cloud.ip);
|
||||
|
||||
let clouds = parse(&mut docker, &config).await?;
|
||||
dbg!(clouds);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue