1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 09:04:12 +02:00

s3: setup ext storage

This commit is contained in:
Robin Appelman 2024-02-16 11:19:55 +01:00
commit edfebef33b

View file

@ -155,4 +155,26 @@ impl ServiceTrait for ObjectStore {
fn apps(&self) -> &'static [&'static str] { fn apps(&self) -> &'static [&'static str] {
&["files_external"] &["files_external"]
} }
async fn post_setup(
&self,
_docker: &Docker,
_cloud_id: &str,
_config: &HazeConfig,
) -> Result<Vec<String>> {
if *self == ObjectStore::S3 {
Ok(vec![
"occ files_external:create s3 amazons3 amazons3::accesskey".into(),
"occ files_external:config 1 bucket ext".into(),
"occ files_external:config 1 hostname s3".into(),
"occ files_external:config 1 port 9000".into(),
"occ files_external:config 1 use_ssl false".into(),
"occ files_external:config 1 use_path_style true".into(),
"occ files_external:config 1 key minio".into(),
"occ files_external:config 1 secret minio123".into(),
])
} else {
Ok(Vec::new())
}
}
} }