mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-04 09:34:08 +02:00
add notify_push service
This commit is contained in:
parent
3cac4e4679
commit
93c20bc530
10 changed files with 224 additions and 45 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use crate::config::HazeConfig;
|
||||
use crate::image::pull_image;
|
||||
use crate::service::ServiceTrait;
|
||||
use crate::Result;
|
||||
|
|
@ -20,7 +21,13 @@ impl ServiceTrait for LDAP {
|
|||
&["LDAP=1"]
|
||||
}
|
||||
|
||||
async fn spawn(&self, docker: &Docker, cloud_id: &str, network: &str) -> Result<String> {
|
||||
async fn spawn(
|
||||
&self,
|
||||
docker: &Docker,
|
||||
cloud_id: &str,
|
||||
network: &str,
|
||||
_config: &HazeConfig,
|
||||
) -> Result<String> {
|
||||
let image = "icewind1991/haze-ldap";
|
||||
pull_image(docker, image).await?;
|
||||
let options = Some(CreateContainerOptions {
|
||||
|
|
@ -57,17 +64,9 @@ impl ServiceTrait for LDAP {
|
|||
format!("{}-ldap", cloud_id)
|
||||
}
|
||||
|
||||
async fn start_message(&self, _docker: &Docker, _cloud_id: &str) -> Result<Option<String>> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
fn apps(&self) -> &'static [&'static str] {
|
||||
&["user_ldap"]
|
||||
}
|
||||
|
||||
async fn post_setup(&self, _docker: &Docker, _cloud_id: &str) -> Result<Vec<String>> {
|
||||
Ok(Vec::new())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
|
|
@ -83,7 +82,13 @@ impl ServiceTrait for LDAPAdmin {
|
|||
&[]
|
||||
}
|
||||
|
||||
async fn spawn(&self, docker: &Docker, cloud_id: &str, network: &str) -> Result<String> {
|
||||
async fn spawn(
|
||||
&self,
|
||||
docker: &Docker,
|
||||
cloud_id: &str,
|
||||
network: &str,
|
||||
_config: &HazeConfig,
|
||||
) -> Result<String> {
|
||||
let image = "osixia/phpldapadmin";
|
||||
pull_image(docker, image).await?;
|
||||
let options = Some(CreateContainerOptions {
|
||||
|
|
@ -149,12 +154,4 @@ impl ServiceTrait for LDAPAdmin {
|
|||
ip
|
||||
)))
|
||||
}
|
||||
|
||||
async fn post_setup(&self, _docker: &Docker, _cloud_id: &str) -> Result<Vec<String>> {
|
||||
Ok(Vec::new())
|
||||
}
|
||||
|
||||
fn apps(&self) -> &'static [&'static str] {
|
||||
&[]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue