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

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2022-03-02 20:18:22 +02:00
parent 1a7a41698c
commit e0d8ddf003
2 changed files with 4 additions and 2 deletions

View file

@ -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 });

View file

@ -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 ====