diff --git a/docker-compose.yml b/docker-compose.yml index 2f6864eb..a51d651b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -119,7 +119,7 @@ services: build: context: . dockerfile: Dockerfile - image: appflowyinc/appflowy_cloud:${BACKEND_VERSION:-latest} + image: appflowyinc/appflowy_cloud:0.0.5 depends_on: - redis - postgres diff --git a/src/application.rs b/src/application.rs index c15338af..9c86e3bf 100644 --- a/src/application.rs +++ b/src/application.rs @@ -280,6 +280,7 @@ async fn setup_admin_account( } async fn get_redis_client(redis_uri: &str) -> Result { + info!("Connecting to redis with uri: {}", redis_uri); let manager = redis::Client::open(redis_uri) .context("failed to connect to redis")? .get_tokio_connection_manager() @@ -289,6 +290,7 @@ async fn get_redis_client(redis_uri: &str) -> Result Result { + info!("Connecting to S3 bucket with setting: {:?}", &s3_setting); let region = { match s3_setting.use_minio { true => s3::Region::Custom { @@ -304,7 +306,7 @@ async fn get_aws_s3_bucket(s3_setting: &S3Setting) -> Result let cred = s3::creds::Credentials { access_key: Some(s3_setting.access_key.to_owned()), - secret_key: Some(s3_setting.secret_key.to_owned()), + secret_key: Some(s3_setting.secret_key.expose_secret().to_owned()), security_token: None, session_token: None, expiration: None, @@ -349,6 +351,7 @@ async fn migrate(pool: &PgPool) -> Result<(), Error> { } async fn get_gotrue_client(setting: &GoTrueSetting) -> Result { + info!("Connecting to GoTrue with setting: {:?}", setting); let gotrue_client = gotrue::api::Client::new(reqwest::Client::new(), &setting.base_url); let _ = gotrue_client .health() diff --git a/src/config/config.rs b/src/config/config.rs index 2232d1c9..f0009c9b 100644 --- a/src/config/config.rs +++ b/src/config/config.rs @@ -25,7 +25,7 @@ pub struct S3Setting { pub use_minio: bool, pub minio_url: String, pub access_key: String, - pub secret_key: String, + pub secret_key: Secret, pub bucket: String, pub region: String, } @@ -114,7 +114,7 @@ pub fn get_configuration() -> Result { use_minio: get_env_var("APPFLOWY_S3_USE_MINIO", "true").parse()?, minio_url: get_env_var("APPFLOWY_S3_MINIO_URL", "http://localhost:9000"), access_key: get_env_var("APPFLOWY_S3_ACCESS_KEY", "minioadmin"), - secret_key: get_env_var("APPFLOWY_S3_SECRET_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"), },