mirror of
https://codeberg.org/icewind/haze.git
synced 2026-10-01 08:44:09 +02:00
Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e2e826817 | |||
| d973bca0b3 | |||
| 3398027ad2 |
25 changed files with 161 additions and 63 deletions
|
|
@ -23,3 +23,4 @@ worktrees
|
||||||
config
|
config
|
||||||
stdin
|
stdin
|
||||||
stdout
|
stdout
|
||||||
|
direnv
|
||||||
|
|
|
||||||
80
DEVELOPING.md
Normal file
80
DEVELOPING.md
Normal file
|
|
@ -0,0 +1,80 @@
|
||||||
|
# Developing
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
### Nix based development environment
|
||||||
|
|
||||||
|
The recommended way to setup the development environment is to use
|
||||||
|
[Lix](https://lix.systems/install/)/[Nix](https://nixos.org/download/).
|
||||||
|
|
||||||
|
Once installed, you can enter the development shell using `nix develop` or,
|
||||||
|
setup [direnv](https://direnv.net/) to automatically enter the development shell
|
||||||
|
when you enter the folder.
|
||||||
|
|
||||||
|
The development shell provides all necessary tooling to develop haze.
|
||||||
|
|
||||||
|
### Without Nix
|
||||||
|
|
||||||
|
The fooling tools need to be setup to develop without using Nix to manage the
|
||||||
|
development setup:
|
||||||
|
|
||||||
|
- [`cargo`](https://doc.rust-lang.org/cargo/getting-started/installation.html) -
|
||||||
|
For building the program
|
||||||
|
- [`mdbook`](https://github.com/rust-lang/mdBook) - For building the
|
||||||
|
documentation
|
||||||
|
- [`prettier`](https://prettier.io/) - For formatting the non-rust files
|
||||||
|
- [`vale`](https://vale.sh/) - For checking documentation
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo build
|
||||||
|
```
|
||||||
|
|
||||||
|
The binary can then be found at `target/debug/haze`.
|
||||||
|
|
||||||
|
## Formatting
|
||||||
|
|
||||||
|
### With Nix
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix fmt
|
||||||
|
```
|
||||||
|
|
||||||
|
### Without Nix
|
||||||
|
|
||||||
|
#### Rust code
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo fmt
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Documentation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
prettier --write '**/*.md'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Building documentation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mdbook serve
|
||||||
|
```
|
||||||
|
|
||||||
|
### Checking documentation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
vale src/ book/src/ book/README.md *.md
|
||||||
|
```
|
||||||
|
|
||||||
|
### Run all checks
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix flake check
|
||||||
|
```
|
||||||
|
|
||||||
|
### Building docker images
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix run .#'"haze-image-php-8.4"'.copyToDockerDaemon
|
||||||
|
```
|
||||||
|
|
@ -35,3 +35,7 @@ Documentation for haze can be found in the
|
||||||
- Navigate to the address that is provided in the output.
|
- Navigate to the address that is provided in the output.
|
||||||
|
|
||||||
See the [book](https://icewind.codeberg.page/haze/) for more details.
|
See the [book](https://icewind.codeberg.page/haze/) for more details.
|
||||||
|
|
||||||
|
## Developing
|
||||||
|
|
||||||
|
See [DEVELOPING.md](./DEVELOPING.md) for information on how to work on `haze`.
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ IDE debugger configuration usually looks like:
|
||||||
|
|
||||||
This would have to be adapted for detached instances.
|
This would have to be adapted for detached instances.
|
||||||
|
|
||||||
### Debugging all requests
|
## Debugging all requests
|
||||||
|
|
||||||
By default, Xdebug is configured to only run for requests that containing the
|
By default, Xdebug is configured to only run for requests that containing the
|
||||||
trigger (e.g. from using the Xdebug browser extension, or adding
|
trigger (e.g. from using the Xdebug browser extension, or adding
|
||||||
|
|
@ -29,3 +29,8 @@ To enable Xdebug for all requests:
|
||||||
|
|
||||||
- Un-comment the lines in `haze [cloud-id] edit /config/php.ini`
|
- Un-comment the lines in `haze [cloud-id] edit /config/php.ini`
|
||||||
- Then run `haze reload [cloud-id]`
|
- Then run `haze reload [cloud-id]`
|
||||||
|
|
||||||
|
## Xdebug profile and trace files
|
||||||
|
|
||||||
|
When enabling Xdebug trace or profile mode, the generated files can be found in
|
||||||
|
`<work-dir>/<instance id>/xdebug`.
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
checks = {
|
checks = {
|
||||||
vale = {vale, ...}: "${vale}/bin/vale src/ book/src/ CHANGELOG.md README.md book/README.md";
|
vale = {vale, ...}: "${vale}/bin/vale src/ book/src/ book/README.md *.md";
|
||||||
};
|
};
|
||||||
|
|
||||||
homeModules = {
|
homeModules = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
use bollard::Docker;
|
||||||
use bollard::models::CreateImageInfo;
|
use bollard::models::CreateImageInfo;
|
||||||
use bollard::query_parameters::CreateImageOptions;
|
use bollard::query_parameters::CreateImageOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use futures_util::StreamExt;
|
use futures_util::StreamExt;
|
||||||
use indicatif::{MultiProgress, ProgressBar, ProgressStyle};
|
use indicatif::{MultiProgress, ProgressBar, ProgressStyle};
|
||||||
use miette::{IntoDiagnostic, Result, WrapErr};
|
use miette::{IntoDiagnostic, Result, WrapErr};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::cloud::Cloud;
|
use crate::cloud::Cloud;
|
||||||
use bollard::config::NetworkCreateRequest;
|
|
||||||
use bollard::Docker;
|
use bollard::Docker;
|
||||||
|
use bollard::config::NetworkCreateRequest;
|
||||||
use miette::{IntoDiagnostic, Result, WrapErr};
|
use miette::{IntoDiagnostic, Result, WrapErr};
|
||||||
|
|
||||||
pub async fn clear_networks(docker: &Docker, instances: &[Cloud]) -> Result<()> {
|
pub async fn clear_networks(docker: &Docker, instances: &[Cloud]) -> Result<()> {
|
||||||
|
|
@ -12,7 +12,8 @@ pub async fn clear_networks(docker: &Docker, instances: &[Cloud]) -> Result<()>
|
||||||
for network in networks {
|
for network in networks {
|
||||||
if let Some(name) = network.name.as_deref()
|
if let Some(name) = network.name.as_deref()
|
||||||
&& let Some(id) = name.strip_prefix("haze-")
|
&& let Some(id) = name.strip_prefix("haze-")
|
||||||
&& !instances.iter().any(|cloud| cloud.id == id) {
|
&& !instances.iter().any(|cloud| cloud.id == id)
|
||||||
|
{
|
||||||
docker.remove_network(name).await.ok();
|
docker.remove_network(name).await.ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
use crate::config::ProxyConfig;
|
use crate::config::ProxyConfig;
|
||||||
use crate::database::Database;
|
use crate::database::Database;
|
||||||
use crate::image::{image_version, pull_image, ImageVersion};
|
use crate::image::{ImageVersion, image_version, pull_image};
|
||||||
use crate::network::ensure_network_exists;
|
use crate::network::ensure_network_exists;
|
||||||
use crate::service::Service;
|
use crate::service::Service;
|
||||||
use crate::service::ServiceTrait;
|
use crate::service::ServiceTrait;
|
||||||
|
use bollard::Docker;
|
||||||
use bollard::config::{ContainerCreateBody, NetworkConnectRequest, NetworkingConfig};
|
use bollard::config::{ContainerCreateBody, NetworkConnectRequest, NetworkingConfig};
|
||||||
use bollard::models::{EndpointSettings, HostConfig};
|
use bollard::models::{EndpointSettings, HostConfig};
|
||||||
use bollard::query_parameters::CreateContainerOptions;
|
use bollard::query_parameters::CreateContainerOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::{IntoDiagnostic, Report, Result, WrapErr};
|
use miette::{IntoDiagnostic, Report, Result, WrapErr};
|
||||||
|
|
@ -127,7 +127,8 @@ impl PhpVersion {
|
||||||
let image_version = image_version(docker, self.image()).await;
|
let image_version = image_version(docker, self.image()).await;
|
||||||
let haze_version = ImageVersion::from_str(env!("CARGO_PKG_VERSION"));
|
let haze_version = ImageVersion::from_str(env!("CARGO_PKG_VERSION"));
|
||||||
if let (Some(image_version), Ok(haze_version)) = (image_version, haze_version)
|
if let (Some(image_version), Ok(haze_version)) = (image_version, haze_version)
|
||||||
&& image_version < haze_version {
|
&& image_version < haze_version
|
||||||
|
{
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"{}: image version is out of date, run {} to update.",
|
"{}: image version is out of date, run {} to update.",
|
||||||
"Warning".red(),
|
"Warning".red(),
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
|
use crate::Result;
|
||||||
use crate::cloud::CloudOptions;
|
use crate::cloud::CloudOptions;
|
||||||
use crate::config::HazeConfig;
|
use crate::config::HazeConfig;
|
||||||
use crate::exec::exec;
|
use crate::exec::exec;
|
||||||
use crate::image::pull_image;
|
use crate::image::pull_image;
|
||||||
use crate::service::{split_cmnd, ServiceTrait};
|
use crate::service::{ServiceTrait, split_cmnd};
|
||||||
use crate::Result;
|
use bollard::Docker;
|
||||||
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
||||||
use bollard::query_parameters::CreateContainerOptions;
|
use bollard::query_parameters::CreateContainerOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::{IntoDiagnostic, WrapErr};
|
use miette::{IntoDiagnostic, WrapErr};
|
||||||
use tokio::fs::write;
|
use tokio::fs::write;
|
||||||
|
|
@ -92,7 +92,9 @@ impl ServiceTrait for ClamIcap {
|
||||||
split_cmnd("occ config:app:set files_antivirus av_host --value=clamav-icap"),
|
split_cmnd("occ config:app:set files_antivirus av_host --value=clamav-icap"),
|
||||||
split_cmnd("occ config:app:set files_antivirus av_port --value=1344"),
|
split_cmnd("occ config:app:set files_antivirus av_port --value=1344"),
|
||||||
split_cmnd("occ config:app:set files_antivirus av_icap_request_service --value=avscan"),
|
split_cmnd("occ config:app:set files_antivirus av_icap_request_service --value=avscan"),
|
||||||
split_cmnd("occ config:app:set files_antivirus av_icap_response_header --value=X-Infection-Found"),
|
split_cmnd(
|
||||||
|
"occ config:app:set files_antivirus av_icap_response_header --value=X-Infection-Found",
|
||||||
|
),
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -196,7 +198,9 @@ impl ServiceTrait for ClamIcapTls {
|
||||||
split_cmnd("occ config:app:set files_antivirus av_host --value=clamav-icap-tls"),
|
split_cmnd("occ config:app:set files_antivirus av_host --value=clamav-icap-tls"),
|
||||||
split_cmnd("occ config:app:set files_antivirus av_port --value=1345"),
|
split_cmnd("occ config:app:set files_antivirus av_port --value=1345"),
|
||||||
split_cmnd("occ config:app:set files_antivirus av_icap_request_service --value=avscan"),
|
split_cmnd("occ config:app:set files_antivirus av_icap_request_service --value=avscan"),
|
||||||
split_cmnd("occ config:app:set files_antivirus av_icap_response_header --value=X-Infection-Found"),
|
split_cmnd(
|
||||||
|
"occ config:app:set files_antivirus av_icap_response_header --value=X-Infection-Found",
|
||||||
|
),
|
||||||
split_cmnd("occ security:certificates:import data/icap-cert.pem"),
|
split_cmnd("occ security:certificates:import data/icap-cert.pem"),
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
|
use crate::Result;
|
||||||
use crate::cloud::CloudOptions;
|
use crate::cloud::CloudOptions;
|
||||||
use crate::config::HazeConfig;
|
use crate::config::HazeConfig;
|
||||||
use crate::image::pull_image;
|
use crate::image::pull_image;
|
||||||
use crate::service::{split_cmnd, ServiceTrait};
|
use crate::service::{ServiceTrait, split_cmnd};
|
||||||
use crate::Result;
|
use bollard::Docker;
|
||||||
use bollard::config::ContainerCreateBody;
|
use bollard::config::ContainerCreateBody;
|
||||||
use bollard::models::{EndpointSettings, HostConfig, NetworkingConfig};
|
use bollard::models::{EndpointSettings, HostConfig, NetworkingConfig};
|
||||||
use bollard::query_parameters::CreateContainerOptions;
|
use bollard::query_parameters::CreateContainerOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::IntoDiagnostic;
|
use miette::IntoDiagnostic;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
|
use crate::Result;
|
||||||
use crate::cloud::CloudOptions;
|
use crate::cloud::CloudOptions;
|
||||||
use crate::config::HazeConfig;
|
use crate::config::HazeConfig;
|
||||||
use crate::image::pull_image;
|
use crate::image::pull_image;
|
||||||
use crate::service::{split_cmnd, ServiceTrait};
|
use crate::service::{ServiceTrait, split_cmnd};
|
||||||
use crate::Result;
|
use bollard::Docker;
|
||||||
use bollard::config::NetworkingConfig;
|
use bollard::config::NetworkingConfig;
|
||||||
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig};
|
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig};
|
||||||
use bollard::query_parameters::CreateContainerOptions;
|
use bollard::query_parameters::CreateContainerOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::IntoDiagnostic;
|
use miette::IntoDiagnostic;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
|
use crate::Result;
|
||||||
use crate::cloud::CloudOptions;
|
use crate::cloud::CloudOptions;
|
||||||
use crate::config::HazeConfig;
|
use crate::config::HazeConfig;
|
||||||
use crate::exec::exec;
|
use crate::exec::exec;
|
||||||
use crate::image::{image_exists, pull_image};
|
use crate::image::{image_exists, pull_image};
|
||||||
use crate::service::{split_cmnd, ServiceTrait};
|
use crate::service::{ServiceTrait, split_cmnd};
|
||||||
use crate::Result;
|
use bollard::Docker;
|
||||||
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
||||||
use bollard::query_parameters::CreateContainerOptions;
|
use bollard::query_parameters::CreateContainerOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::{bail, IntoDiagnostic};
|
use miette::{IntoDiagnostic, bail};
|
||||||
use std::io::Stdout;
|
use std::io::Stdout;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
|
use crate::Result;
|
||||||
use crate::cloud::CloudOptions;
|
use crate::cloud::CloudOptions;
|
||||||
use crate::config::{HazeConfig, ProxyConfig};
|
use crate::config::{HazeConfig, ProxyConfig};
|
||||||
use crate::image::pull_image;
|
use crate::image::pull_image;
|
||||||
use crate::service::{split_cmnd, ServiceTrait};
|
use crate::service::{ServiceTrait, split_cmnd};
|
||||||
use crate::Result;
|
use bollard::Docker;
|
||||||
use bollard::config::NetworkingConfig;
|
use bollard::config::NetworkingConfig;
|
||||||
use bollard::models::{ContainerCreateBody, ContainerState, EndpointSettings, HostConfig};
|
use bollard::models::{ContainerCreateBody, ContainerState, EndpointSettings, HostConfig};
|
||||||
use bollard::query_parameters::CreateContainerOptions;
|
use bollard::query_parameters::CreateContainerOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::{IntoDiagnostic, Report};
|
use miette::{IntoDiagnostic, Report};
|
||||||
use std::net::IpAddr;
|
use std::net::IpAddr;
|
||||||
|
|
@ -102,7 +102,9 @@ impl ServiceTrait for Ldap {
|
||||||
split_cmnd("occ ldap:set-config s01 ldapBase dc=example,dc=org"),
|
split_cmnd("occ ldap:set-config s01 ldapBase dc=example,dc=org"),
|
||||||
split_cmnd("occ ldap:set-config s01 ldapBaseUsers dc=example,dc=org"),
|
split_cmnd("occ ldap:set-config s01 ldapBaseUsers dc=example,dc=org"),
|
||||||
split_cmnd("occ ldap:set-config s01 ldapBaseGroups dc=example,dc=org"),
|
split_cmnd("occ ldap:set-config s01 ldapBaseGroups dc=example,dc=org"),
|
||||||
split_cmnd("occ ldap:set-config s01 ldapLoginFilter (&(&(objectclass=inetOrgPerson))(uid=%uid))"),
|
split_cmnd(
|
||||||
|
"occ ldap:set-config s01 ldapLoginFilter (&(&(objectclass=inetOrgPerson))(uid=%uid))",
|
||||||
|
),
|
||||||
split_cmnd("occ ldap:set-config s01 ldapUserFilter ((objectclass=inetOrgPerson))"),
|
split_cmnd("occ ldap:set-config s01 ldapUserFilter ((objectclass=inetOrgPerson))"),
|
||||||
split_cmnd("occ ldap:set-config s01 ldapUserFilterMode 0"),
|
split_cmnd("occ ldap:set-config s01 ldapUserFilterMode 0"),
|
||||||
split_cmnd("occ ldap:set-config s01 ldapUserDisplayName sn"),
|
split_cmnd("occ ldap:set-config s01 ldapUserDisplayName sn"),
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
|
use crate::Result;
|
||||||
use crate::cloud::CloudOptions;
|
use crate::cloud::CloudOptions;
|
||||||
use crate::config::HazeConfig;
|
use crate::config::HazeConfig;
|
||||||
use crate::image::pull_image;
|
use crate::image::pull_image;
|
||||||
use crate::service::{split_cmnd, ServiceTrait};
|
use crate::service::{ServiceTrait, split_cmnd};
|
||||||
use crate::Result;
|
use bollard::Docker;
|
||||||
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
||||||
use bollard::query_parameters::CreateContainerOptions;
|
use bollard::query_parameters::CreateContainerOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::IntoDiagnostic;
|
use miette::IntoDiagnostic;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
|
use crate::Result;
|
||||||
use crate::cloud::CloudOptions;
|
use crate::cloud::CloudOptions;
|
||||||
use crate::config::HazeConfig;
|
use crate::config::HazeConfig;
|
||||||
use crate::exec::exec;
|
use crate::exec::exec;
|
||||||
use crate::image::pull_image;
|
use crate::image::pull_image;
|
||||||
use crate::service::ServiceTrait;
|
use crate::service::ServiceTrait;
|
||||||
use crate::Result;
|
use bollard::Docker;
|
||||||
use bollard::config::NetworkingConfig;
|
use bollard::config::NetworkingConfig;
|
||||||
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig};
|
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig};
|
||||||
use bollard::query_parameters::CreateContainerOptions;
|
use bollard::query_parameters::CreateContainerOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::IntoDiagnostic;
|
use miette::IntoDiagnostic;
|
||||||
use std::io::Stdout;
|
use std::io::Stdout;
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
|
use crate::Result;
|
||||||
use crate::cloud::CloudOptions;
|
use crate::cloud::CloudOptions;
|
||||||
use crate::config::HazeConfig;
|
use crate::config::HazeConfig;
|
||||||
use crate::image::pull_image;
|
use crate::image::pull_image;
|
||||||
use crate::service::ServiceTrait;
|
use crate::service::ServiceTrait;
|
||||||
use crate::Result;
|
use bollard::Docker;
|
||||||
use bollard::models::{
|
use bollard::models::{
|
||||||
ContainerCreateBody, ContainerState, EndpointSettings, HostConfig, NetworkingConfig,
|
ContainerCreateBody, ContainerState, EndpointSettings, HostConfig, NetworkingConfig,
|
||||||
};
|
};
|
||||||
use bollard::query_parameters::CreateContainerOptions;
|
use bollard::query_parameters::CreateContainerOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::{IntoDiagnostic, Report};
|
use miette::{IntoDiagnostic, Report};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
|
use crate::Result;
|
||||||
use crate::cloud::CloudOptions;
|
use crate::cloud::CloudOptions;
|
||||||
use crate::config::HazeConfig;
|
use crate::config::HazeConfig;
|
||||||
use crate::exec::exec;
|
use crate::exec::exec;
|
||||||
use crate::image::pull_image;
|
use crate::image::pull_image;
|
||||||
use crate::service::{split_cmnd, ServiceTrait};
|
use crate::service::{ServiceTrait, split_cmnd};
|
||||||
use crate::Result;
|
use bollard::Docker;
|
||||||
use bollard::models::{
|
use bollard::models::{
|
||||||
ContainerCreateBody, ContainerState, EndpointSettings, HostConfig, NetworkingConfig,
|
ContainerCreateBody, ContainerState, EndpointSettings, HostConfig, NetworkingConfig,
|
||||||
};
|
};
|
||||||
use bollard::query_parameters::CreateContainerOptions;
|
use bollard::query_parameters::CreateContainerOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::{IntoDiagnostic, Report};
|
use miette::{IntoDiagnostic, Report};
|
||||||
use std::net::Ipv4Addr;
|
use std::net::Ipv4Addr;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
use std::io::stdout;
|
use std::io::stdout;
|
||||||
|
|
||||||
|
use crate::Result;
|
||||||
use crate::cloud::CloudOptions;
|
use crate::cloud::CloudOptions;
|
||||||
use crate::config::HazeConfig;
|
use crate::config::HazeConfig;
|
||||||
use crate::database::DatabaseFamily;
|
use crate::database::DatabaseFamily;
|
||||||
use crate::exec::exec;
|
use crate::exec::exec;
|
||||||
use crate::service::ServiceTrait;
|
use crate::service::ServiceTrait;
|
||||||
use crate::Result;
|
|
||||||
use bollard::Docker;
|
use bollard::Docker;
|
||||||
use miette::Report;
|
use miette::Report;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@ use crate::cloud::CloudOptions;
|
||||||
use crate::config::HazeConfig;
|
use crate::config::HazeConfig;
|
||||||
use crate::image::pull_image;
|
use crate::image::pull_image;
|
||||||
use crate::service::ServiceTrait;
|
use crate::service::ServiceTrait;
|
||||||
|
use bollard::Docker;
|
||||||
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
||||||
use bollard::query_parameters::CreateContainerOptions;
|
use bollard::query_parameters::CreateContainerOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use local_ip_address::list_afinet_netifas;
|
use local_ip_address::list_afinet_netifas;
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::{IntoDiagnostic, Result};
|
use miette::{IntoDiagnostic, Result};
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
|
use crate::Result;
|
||||||
use crate::cloud::CloudOptions;
|
use crate::cloud::CloudOptions;
|
||||||
use crate::config::HazeConfig;
|
use crate::config::HazeConfig;
|
||||||
use crate::image::pull_image;
|
use crate::image::pull_image;
|
||||||
use crate::service::{split_cmnd, ServiceTrait};
|
use crate::service::{ServiceTrait, split_cmnd};
|
||||||
use crate::Result;
|
use bollard::Docker;
|
||||||
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
||||||
use bollard::query_parameters::CreateContainerOptions;
|
use bollard::query_parameters::CreateContainerOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::IntoDiagnostic;
|
use miette::IntoDiagnostic;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
|
use crate::Result;
|
||||||
use crate::cloud::CloudOptions;
|
use crate::cloud::CloudOptions;
|
||||||
use crate::config::HazeConfig;
|
use crate::config::HazeConfig;
|
||||||
use crate::image::pull_image;
|
use crate::image::pull_image;
|
||||||
use crate::service::{split_cmnd, ServiceTrait};
|
use crate::service::{ServiceTrait, split_cmnd};
|
||||||
use crate::Result;
|
use bollard::Docker;
|
||||||
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
||||||
use bollard::query_parameters::CreateContainerOptions;
|
use bollard::query_parameters::CreateContainerOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::{Context, IntoDiagnostic};
|
use miette::{Context, IntoDiagnostic};
|
||||||
use std::fs::{create_dir_all, write};
|
use std::fs::{create_dir_all, write};
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
|
use crate::Result;
|
||||||
use crate::cloud::CloudOptions;
|
use crate::cloud::CloudOptions;
|
||||||
use crate::config::HazeConfig;
|
use crate::config::HazeConfig;
|
||||||
use crate::database::DatabaseFamily;
|
use crate::database::DatabaseFamily;
|
||||||
use crate::service::ServiceTrait;
|
use crate::service::ServiceTrait;
|
||||||
use crate::Result;
|
|
||||||
use bollard::Docker;
|
use bollard::Docker;
|
||||||
use futures_util::future::try_join_all;
|
use futures_util::future::try_join_all;
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::Report;
|
use miette::Report;
|
||||||
use serde_json::json;
|
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
|
use serde_json::json;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::convert::identity;
|
use std::convert::identity;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
|
use crate::Result;
|
||||||
use crate::cloud::CloudOptions;
|
use crate::cloud::CloudOptions;
|
||||||
use crate::config::HazeConfig;
|
use crate::config::HazeConfig;
|
||||||
use crate::image::pull_image;
|
use crate::image::pull_image;
|
||||||
use crate::service::{split_cmnd, ServiceTrait};
|
use crate::service::{ServiceTrait, split_cmnd};
|
||||||
use crate::Result;
|
use bollard::Docker;
|
||||||
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
||||||
use bollard::query_parameters::CreateContainerOptions;
|
use bollard::query_parameters::CreateContainerOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::IntoDiagnostic;
|
use miette::IntoDiagnostic;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
|
use crate::Result;
|
||||||
use crate::cloud::CloudOptions;
|
use crate::cloud::CloudOptions;
|
||||||
use crate::config::HazeConfig;
|
use crate::config::HazeConfig;
|
||||||
use crate::image::pull_image;
|
use crate::image::pull_image;
|
||||||
use crate::service::ServiceTrait;
|
use crate::service::ServiceTrait;
|
||||||
use crate::Result;
|
use bollard::Docker;
|
||||||
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
use bollard::models::{ContainerCreateBody, EndpointSettings, HostConfig, NetworkingConfig};
|
||||||
use bollard::query_parameters::CreateContainerOptions;
|
use bollard::query_parameters::CreateContainerOptions;
|
||||||
use bollard::Docker;
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use miette::IntoDiagnostic;
|
use miette::IntoDiagnostic;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ use std::io::Cursor;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use tokio::fs::create_dir_all;
|
use tokio::fs::create_dir_all;
|
||||||
use zip::read::root_dir_common_filter;
|
|
||||||
use zip::ZipArchive;
|
use zip::ZipArchive;
|
||||||
|
use zip::read::root_dir_common_filter;
|
||||||
|
|
||||||
pub struct Sources {
|
pub struct Sources {
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue