-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Files are lost on deploy #235
Comments
.uploads is not meteor dir and is ignored by meteor :/ that's why you upload there to avoid hot code push upon update |
Any ideas? Is this an issue with "mup deploy" deleting the files? Is there another solution/workaround? Even if I remove the ".", I assume a deploy will always replace the folder contents with the local folder, so that is not a good solution for me; otherwise I might be willing to cause a reload on file upload, ridiculous, but anything to keep the files on a code update. |
If you want to retain files you need to upload to "public" dir which will cause hot code reload on every upload. Out of curiosity, why would you want to deploy uploaded files from develop? Just put all files that you need to public and upload into separate dir... |
I think there is a misunderstanding. I deploy the application than users can upload files, like their user profile picture. However, the next time I deploy all the files that they had uploaded are gone. I am trying to figure out how to have a live website, that I can then update without destroying all of the users' files. |
Gotcha. Create an upload directory out of the app directory, e.g. On Sunday, May 22, 2016, S notifications@github.com wrote:
Tomi Trescak / Researcher [image: Facebook] https://www.facebook.com/tomi.trescak[image: Twitter] |
I have tried "/opt/uploads". I changed the directories with "chmod a+rwx /opt/uploads". Sadly, the files are uploaded (great), but I can't find them in that directory. I have no clue where they are going, but re-deploying once again destroys them. I am uploading to DigitalOcean, I also looked through: #40 I could find the files when it was set: process.env.PWD+"/uploads" ... and process.env.PWD = "bundle/bundle". Which is contained in "/opt/app name/current/bundle/uploads" |
As per documentation. If you set your server to following you will always find your files on /opt/uploads
Make sure you have good permissions, |
If you are using mupx deploy, files that you upload will stay inside a docker container. Whenever you redeploy your app, mupx will create a new docker container, so the files will be lost, each time. Discovered that the hard way |
Any ideas how to solve this? I don't seem to be able to access any folders outside of the docker container... |
you should, some how, make a persistent docker only for the files, and somehow connect to the meteor docker. |
Guys, you won't like the answer, but the best is to use the original mup not mupx that does not use docker. It still works well even with new meteor. The other option is to modify the mupx deploy script and add the parameter to mount external folder. I see @nick-preda that you already tried to do that, what was your result? |
But from what I see it shall be easy to do, you need to modify the script at https://github.com/arunoda/meteor-up/blob/mupx/templates/linux/start.sh#L26 And add a new mapping. You can map multiple volumes such as following: http://stackoverflow.com/questions/18861834/mounting-multiple-volumes-on-a-docker-container So your script would look like (mounting the folder on the host machine
|
Awesome! Didn't actually know that was one of the key differences between mup and mupx. I'll be honest, my project kept throwing setup errors with mup, which is why I tried mupx and it worked. THANK YOU so much, for finding this, I have been searching how to save stuff outside of the docker container, I was making progress, but this is WAY more helpful now. |
That worked for me. Thanks. I tested it just now. |
i have no idea why, but now i've got everything written down, if anyone wants to try again with mup: i've created a new virtual machine, from which to deploy the meteor application and then executed these to install the desired node version through n install meteor and finally install mup after which I successfully ran: inserting nodeVersion 0.10.36 in mup.json, and deployCheckWaitTime to 120 you have also to give the right permissions to the upload folder, to be able to upload through mup. hope it will help someone i've been using mupx lately, since mup gave me huge trouble, but i'll still bookmark this answer @tomitrescak , as it's the solution to the docker setup. thanks a lot |
The files that exist on the server are lost when "mup deploy" is run.
I think it is necessary to be able to re-upload the project without losing files...
The text was updated successfully, but these errors were encountered: