I'm having an issue with storing images to a dokku module that is running on digital ocean.
I'm using
- meanjs 0.4.0
- angular-file-upload (for the upload)
- digital ocean droplet with Dokku 0.3.18 and ubuntu 14.04
What I did so far:
- Implemented and tested the code locally - works fine
- Deployed the code to digital ocean
Added a 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 app "dokku ps:rebuild vnmean" and checked the container via
docker inspect <containerId>
With the result (at the end):
"Volumes": {
"/modules/pictures/client/img": "/home/dokku/vnmean/share"
},
"VolumesRW": {
"/modules/pictures/client/img": true
}
I also checked the two folders via:
dokku run vnmean ls /modules/pictures/client/img
And via:
ls /home/dokku/vnmean/share
I can change any of the folders via host-shell and the other one gets updated.
Issue:
Whenever I upload a picture via web-fileupload none of the folders is updated. I would expect that the /home/dokku/vnmean/share
folder would now hold the uploaded data, but unfortunately it's unchanged.
I know that the picture upload worked as it is displayed afterwards but as soon as I do a restart or redeploy, the pictures are gone.
I'm not sure if I got something wrong with the persistent storage or if I missed a step.
Could you have a look and let me know what's the issue or what can be done to get a folder that stores the uploads without getting overwritten during restart or deploy and that can be accessed from the host-shell?