- I have created a cloud foundry app to deploy node js application in bluemix.
- I have used the commands which they given in Getting Started, to deploy my node js application from local to bluemix. Application is deployed successfully and app starts running.
- Now I have to download the code (the entire project folder) I have deployed, how can I do this?
0
votes
Why would you want to? How did you deploy it in the first place if you don't have the code? This seems totally backwards.
- jonrsharpe
In my application user can upload the files, That files will store in my application folder thats why i need to download before i re-deploy the application again.If i deploy without taking backup of files uploaded,it gets erased
- user7369339
That is in itself a problem, because the storage in CF isn't persistent - if your app falls over and gets restarted by the platform, all of the files already uploaded will be gone. You need to move them outside the app into persistent storage, which you can then access from elsewhere too (think S3 bucket or similar). Note I can only judge based on what you wrote, which referred to source code not user uploaded content.
- jonrsharpe
Thanks for your answer. Is there any official link to examine this senario ?
- user7369339
I'm not sure exactly what you mean, but the broad idea is basic 12-factor stuff: 12factor.net. For CF specifically: docs.cloudfoundry.org/devguide/deploy-apps/…
- jonrsharpe
1 Answers
1
votes
It isn't recommended to write files to the filesystem in a Cloud Foundry app on Bluemix, it's purely a runtime. If you need to store files, try using the Object Storage offering on Bluemix https://console.bluemix.net/catalog/services/Object-Storage which will keep your files safe and allow you to access them, back them up, or whatever you need.