Merge pull request #239 from fyfrey/s3-compatibility

feat: s3 compatiblity with garage
This commit is contained in:
Zack 2024-01-04 16:01:35 +08:00 committed by GitHub
commit 748d5041c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ USE_MINIO=true
AWS_ACCESS_KEY_ID=minioadmin
AWS_SECRET_ACCESS_KEY=minioadmin
AWS_S3_BUCKET=appflowy
AWS_REGION=us-east-1
#AWS_REGION=us-east-1
RUST_LOG=info

View File

@ -55,7 +55,7 @@ USE_MINIO=true
AWS_ACCESS_KEY_ID=minioadmin
AWS_SECRET_ACCESS_KEY=minioadmin
AWS_S3_BUCKET=appflowy
AWS_REGION=us-east-1
#AWS_REGION=us-east-1
RUST_LOG=info

View File

@ -294,7 +294,7 @@ async fn get_aws_s3_bucket(s3_setting: &S3Setting) -> Result<s3::Bucket, Error>
let region = {
match s3_setting.use_minio {
true => s3::Region::Custom {
region: "".to_owned(),
region: s3_setting.region.to_owned(),
endpoint: s3_setting.minio_url.to_owned(),
},
false => s3_setting

View File

@ -116,7 +116,7 @@ pub fn get_configuration() -> Result<Config, anyhow::Error> {
access_key: get_env_var("APPFLOWY_S3_ACCESS_KEY", "minioadmin"),
secret_key: get_env_var("APPFLOWY_S3_SECRET_KEY", "minioadmin").into(),
bucket: get_env_var("APPFLOWY_S3_BUCKET", "appflowy"),
region: get_env_var("APPFLOWY_S3_REGION", "us-east-1"),
region: get_env_var("APPFLOWY_S3_REGION", ""),
},
casbin: CasbinSetting {
pool_size: get_env_var("APPFLOWY_CASBIN_POOL_SIZE", "8").parse()?,