diff --git a/server/migrations.js b/server/migrations.js index b1c4687bf..3673ac198 100644 --- a/server/migrations.js +++ b/server/migrations.js @@ -1128,7 +1128,7 @@ Migrations.add('add-card-details-show-lists', () => { Migrations.add('migrate-attachments-collectionFS-to-ostrioFiles', () => { //const storagePath = Attachments.storagePath(); - const storagePath = process.env.WRITABLE_PATH; + const storagePath = process.env.WRITABLE_PATH || `./wekan-uploads`; if (!fs.existsSync(storagePath)) { console.log("create storagePath because it doesn't exist: " + storagePath); fs.mkdirSync(storagePath, { recursive: true }); @@ -1195,7 +1195,8 @@ Migrations.add('migrate-attachments-collectionFS-to-ostrioFiles', () => { }); Migrations.add('migrate-avatars-collectionFS-to-ostrioFiles', () => { - const storagePath = Avatars.storagePath(); + //const storagePath = Avatars.storagePath(); + const storagePath = process.env.WRITABLE_PATH || `./wekan-uploads`; if (!fs.existsSync(storagePath)) { console.log("create storagePath because it doesn't exist: " + storagePath); fs.mkdirSync(storagePath, { recursive: true }); diff --git a/torodb-postgresql/docker-compose.yml b/torodb-postgresql/docker-compose.yml index 8a882ef86..245cf34db 100644 --- a/torodb-postgresql/docker-compose.yml +++ b/torodb-postgresql/docker-compose.yml @@ -154,6 +154,7 @@ services: # use 3001:8080 . Do not add any extra address etc here, that way it does not work. - 80:8080 environment: + - WRITABLE_PATH=/data - MONGO_URL=mongodb://mongodb:27017/wekan #--------------------------------------------------------------- # ==== ROOT_URL SETTING ====