wekan icon indicating copy to clipboard operation
wekan copied to clipboard

[Docker] Attachments are uploaded to mongoDB instead of WRITABLE_PATH

Open GuillaumeV-cemea opened this issue 8 months ago • 3 comments

Issue

Server Setup Information

  • Did you test in newest Wekan?:Yes
  • Did you configure root-url correctly so Wekan cards open correctly (see https://github.com/wekan/wekan/wiki/Settings)? Yes
  • Operating System: Debian 11
  • Deployment Method (Snap/Docker/Sandstorm/bundle/source): Docker
  • Http frontend if any (Caddy, Nginx, Apache, see config examples from Wekan GitHub wiki first): nginx
  • Node.js Version: 14.21.4
  • MongoDB Version:6.0.11
  • What webbrowser version are you using (Wekan should work on all modern browsers that support Javascript)? Firefox

Problem description

WRITABLE_PATH is set like official docker-compose.yml to /data, which is itself a named docker volume.

I updated my wekan installation from 6.09 + mongo 5 to 7.17 + mongo 6 like this :

  • Update to 6.99.9 (by changing tag in docker-compose.yml)
  • Wait for attachments migration to be done, which created empty files in /data/attachments
  • Attachments are working fine
  • In admin area, go to attachments > migrate everything to file system
  • Wait a bit and see in /data/attachments that files are now non-0 size
  • Update to 7.17 (by changing tag in docker-compose.yml), start wekan and check everything is working
  • Update mongo to v6, restart everything, check that everything is working
  • Update mongoDB FeatureCompatibilityVersion :
docker compose exec -it wekandb mongosh
> db.adminCommand( { setFeatureCompatibilityVersion: "6.0" } )
  • Restart everything (to be sure)

I have a perfectly working 7.17 + mongo 6 version, however when I upload a new attachment, it's saved in DB instead of on disk. I can then migrate it to disk with admin area perfectly fine, but the next attachment will still be uploaded to the DB.

Reproduction Steps

Update wekan from 6.09 to 7.17, and upload a new attachment.

Logs

Only some "connection accepted/closed" from mongoDB (so nothing exceptional)

GuillaumeV-cemea avatar Nov 10 '23 12:11 GuillaumeV-cemea

@mfilser

Is there any setting to select, what is default storage for uploading files?

xet7 avatar Nov 10 '23 12:11 xet7

Default storage is GridFs. There's no setting yet

mfilser avatar Nov 10 '23 13:11 mfilser

For me the same, I am looking for the possibility to set the default storage. No settings available

FuXXz avatar Feb 22 '24 18:02 FuXXz