1
0
Fork 0
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:
Robin Appelman 2021-03-12 19:09:44 +01:00
commit e939a8fffb
3 changed files with 179 additions and 37 deletions

View file

@ -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(())
}