瀏覽代碼

Added WRITABLE_PATH to be usable when developing with meteor command, and to torodb.

Thanks to xet7 !
Lauri Ojansivu 3 年之前
父節點
當前提交
e0d8ddf003
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 3 2
      server/migrations.js
  2. 1 0
      torodb-postgresql/docker-compose.yml

+ 3 - 2
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 });

+ 1 - 0
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 ====