From a6e0fbed53609f79fccc76c3b3ff1d028f2c3ae4 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Sat, 23 Sep 2023 22:50:22 +0200 Subject: [PATCH] {DEBUG} Production env --- .gitignore | 1 + docker-compose.yml | 7 ++++++- src/middleware/Uploads.js | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e067c4f..8610093 100644 --- a/.gitignore +++ b/.gitignore @@ -132,3 +132,4 @@ dist .DS_Store uploads +db diff --git a/docker-compose.yml b/docker-compose.yml index 9373655..0410ceb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,8 +30,13 @@ services: - images-upload images-upload-db: container_name: images-upload-db - image: mongo:latest + image: nertworkweb/mongodb-no-avx + # image: mongo:latest restart: always + volumes: + - ./db:/data/db + ports: + - 2667:27017 networks: - images-upload diff --git a/src/middleware/Uploads.js b/src/middleware/Uploads.js index 86ed062..7c39b73 100644 --- a/src/middleware/Uploads.js +++ b/src/middleware/Uploads.js @@ -99,7 +99,7 @@ class Uploads extends Pages { await resizeImage( req.file.path, - path.join( + join( this.userUploadDir, mediumFileName, ), @@ -108,7 +108,7 @@ class Uploads extends Pages { ); await resizeImage( req.file.path, - path.join( + join( this.userUploadDir, smallFileName, ),