File storage issue with dokku

I am having a problem with storing images in a dokku module that works in digital ocean.

I use

  • meanjs 0.4.0
  • angular-file-upload (for upload)
  • digital ocean droplet with Dokku 0.3.18 and ubuntu 14.04

What I have done so far:

  • Implemented and tested the code locally - works great
  • Expanded code for the digital ocean
  • Added persistent storage via:

    dokku docker-options:add vnmean run "-v /home/dokku/vnmean/share:/modules/pictures/client/img"
    dokku docker-options:add vnmean deploy "-v /home/dokku/vnmean/share:/modules/pictures/client/img"
    
          

  • Rebuild the "dokku ps: rebuild vnmean" application and check the container via

    docker inspect <containerId>
    
          

As a result (at the end):

"Volumes": {
    "/modules/pictures/client/img": "/home/dokku/vnmean/share"
},
"VolumesRW": {
    "/modules/pictures/client/img": true
}

      

  1. I also checked two folders with:

    dokku run vnmean ls /modules/pictures/client/img
    
          

And through:

    ls /home/dokku/vnmean/share

      

I can change any of the folders via the host shell and the other will update.

Question:

Whenever I upload an image via web-fileupload, none of the folders get updated. I would have expected the folder /home/dokku/vnmean/share

to save the downloaded data now, but unfortunately it hasn't changed.

I know loading the image worked the way it is displayed after that, but as soon as I reload or relocate the images disappear.

I'm not sure if I have something wrong with persistent storage, or if I missed a step.

Could you take a look and let me know what the problem is or what can be done to get the folder where the downloads are stored without being overwritten during reboot or deployment and which can be accessed from the host shell?

+3


source to share


1 answer


I think you need to set the owner of the folder



chown dokku:dokku /home/dokku/vnmean/share

      

0


source







All Articles