π The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
Fix docker variables and env variables for monio
Smaug67393698826d6118
diff --git a/.env.example b/.env.exampleindex a48148d6..a9d248c1 100644--- a/.env.example+++ b/.env.example@@ -35,10 +35,13 @@ MYSQL_PASSWORD=password# 2. OBJECT STORAGE (RustFS / S3 Compatible)RUSTFS_EXTERNAL_PORT=9005 # The port exposed on your host machine for S3 API access+MINIO_ENDPOINT=localhost:9005 # The endpoint URL for the object storage (e.g., localhost:9000) Important to use the correct domain for signing URLs+MINIO_SECURE=false # Set to 'true' if your S3 endpoint uses HTTPS (true/false)+# Access credentials for the object storageRUSTFS_ACCESS_KEY=alexandrie-keyRUSTFS_SECRET_KEY=alexandrie-secret-MINIO_BUCKET=alexandrie # The default S3 bucket name where files will be stored+MINIO_BUCKET=alexandrie # The default S3 bucket name where files will be stored (alexandrie and alexandrie-backups are created by default)RUSTFS_CONSOLE_ENABLE=false # Enable or disable the RustFS web management console (true/false)RUSTFS_LOG_LEVEL=info # Logging level (debug, info, warn, error)diff --git a/backend/app/minio.go b/backend/app/minio.goindex 047202b5..ca787eb8 100644--- a/backend/app/minio.go+++ b/backend/app/minio.go@@ -21,10 +21,22 @@ func MinioConnection() (*minio.Client, error) {if endpoint == "" || accessKeyID == "" || secretAccessKey == "" {return nil, fmt.Errorf("MINIO NOT CONFIGURED")}++ isSecure := os.Getenv("MINIO_SECURE") == "true"+ // Override: if MINIO_SECURE is not set, infer from endpoint+ if os.Getenv("MINIO_SECURE") == "" {++ isSecure = true+ // If localhost is used (start with localhost), disable SSL+ if len(endpoint) >= 9 && endpoint[:9] == "localhost" {+ isSecure = false+ }+ }+// Initialize minio client object.minioClient, errInit := minio.New(endpoint, &minio.Options{Creds: credentials.NewStaticV4(accessKeyID, secretAccessKey, ""),- Secure: true,+ Secure: isSecure,})if errInit != nil {log.Fatalln(errInit)diff --git a/docker-compose.yml b/docker-compose.ymlindex 1b86a8f7..2dfe0576 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -70,7 +70,8 @@ services:# Object storage configuration (S3 compatible like RustFS, MinIO, etc.)# OPTIONAL: If you don't want to use the CDN feature you can leave these variables empty- MINIO_ENDPOINT: rustfs:9000+ MINIO_ENDPOINT: ${MINIO_ENDPOINT:-rustfs:9000}+ MINIO_SECURE: '${MINIO_SECURE:-false}' # Set to 'true' if your S3 endpoint uses HTTPSMINIO_ACCESSKEY: ${RUSTFS_ACCESS_KEY:-alexandrie-key}MINIO_SECRETKEY: ${RUSTFS_SECRET_KEY:-alexandrie-secret}MINIO_BUCKET: ${MINIO_BUCKET:-alexandrie}diff --git a/frontend/.env b/frontend/.envindex 5ccdeed8..54449d8d 100644--- a/frontend/.env+++ b/frontend/.env@@ -1,5 +1,5 @@NUXT_PUBLIC_BASE_API=http://localhost:8201-NUXT_PUBLIC_BASE_CDN=http://localhost:9000/alexandrie+NUXT_PUBLIC_BASE_CDN=http://localhost:9000NUXT_PUBLIC_CONFIG_DISABLE_LANDING_PAGE=falseNUXT_PUBLIC_CONFIG_DISABLE_SIGNUP_PAGE=false\ No newline at end of filediff --git a/frontend/app/composables/useApi.ts b/frontend/app/composables/useApi.tsindex cad2cfc3..9661fb59 100644--- a/frontend/app/composables/useApi.ts+++ b/frontend/app/composables/useApi.ts@@ -11,7 +11,7 @@ export function useApi() {function resourceURL(resource?: Node): string {if (!resource) return '';- return `${CDN}/${resource.user_id}/${resource.metadata?.transformed_path || resource.content}`;+ return `${CDN}/alexandrie/${resource.user_id}/${resource.metadata?.transformed_path || resource.content}`;}return { CDN, API, avatarURL, resourceURL };