Skip to content

Commit

Permalink
Merge pull request #583 from Hexastack/feat/storage-mode-env-var
Browse files Browse the repository at this point in the history
feat: make storage mode configurable env var
  • Loading branch information
marrouchi authored Jan 17, 2025
2 parents b74c4a4 + 3ed8bbc commit bb2d0d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const config: Config = {
process.env.UPLOAD_DIR || '/uploads',
'/avatars',
),
storageMode: 'disk',
storageMode: (process.env.STORAGE_MODE as 'disk' | 'memory') || 'disk',
maxUploadSize: process.env.UPLOAD_MAX_SIZE_IN_BYTES
? Number(process.env.UPLOAD_MAX_SIZE_IN_BYTES)
: 50 * 1024 * 1024, // 50 MB in bytes
Expand Down
4 changes: 3 additions & 1 deletion docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ HTTPS_ENABLED=false
SESSION_SECRET=f661ff500fff6b0c8f91310b6fff6b0c
SESSION_NAME=s.id
# Relative attachments upload directory path to the app folder
UPLOAD_DIR=/uploads
UPLOAD_DIR=/uploads
# STORAGE MODE
STORAGE_MODE=disk
# Max attachments upload size in bytes
UPLOAD_MAX_SIZE_IN_BYTES=20971520
INVITATION_JWT_SECRET=dev_only
Expand Down

0 comments on commit bb2d0d4

Please sign in to comment.