diff --git a/api/src/config/index.ts b/api/src/config/index.ts index ac7131cf..68898396 100644 --- a/api/src/config/index.ts +++ b/api/src/config/index.ts @@ -104,11 +104,9 @@ export const config: Config = { }, parameters: { uploadDir: - (process.env.UPLOAD_DIR ? join(process.cwd(), process.env.UPLOAD_DIR)) : + (process.env.UPLOAD_DIR && join(process.cwd(), process.env.UPLOAD_DIR)) ?? join(process.cwd(), 'uploads'), - avatarDir: - (process.env.AVATAR_DIR ? join(process.cwd(), process.env.AVATAR_DIR)) : - join(process.cwd(), 'avatars'), + avatarDir: process.env.AVATAR_DIR ?? join(process.cwd(), 'avatars'), storageMode: 'disk', maxUploadSize: process.env.UPLOAD_MAX_SIZE_IN_BYTES ? Number(process.env.UPLOAD_MAX_SIZE_IN_BYTES) diff --git a/docker/.env.example b/docker/.env.example index 834b3e17..72f1faf1 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -15,7 +15,6 @@ HTTPS_ENABLED=false SESSION_SECRET=f661ff500fff6b0c8f91310b6fff6b0c SESSION_NAME=s.id UPLOAD_DIR=/uploads -AVATAR_DIR=/avatars UPLOAD_MAX_SIZE_IN_BYTES=2000000 INVITATION_JWT_SECRET=dev_only INVITATION_EXPIRES_IN=24h @@ -72,3 +71,4 @@ APP_REDIS_PORT=9001 REDIS_ENABLED=false REDIS_HOST=redis REDIS_PORT=6379 + diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index bd0f2d39..36ebce9e 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -12,7 +12,6 @@ services: - app-network volumes: - api-data:/app/uploads - - api-avatars-data:/app/avatars depends_on: mongo: condition: service_healthy @@ -56,7 +55,6 @@ services: volumes: mongo-data: api-data: - api-avatars-data: networks: db-network: