Pregunta

I have a python app on dotCloud. I publish my original code with dotCloud push. After that I login to that app with dotcloud run --application myApp www.0 and install something on the server. Now I want to edit again some stuff on my local machine and push it to dotCloud. But if I just do a dotCloud push again, then the changes I did on the server are obviously gone. How can I first sync these changes with my local files?

¿Fue útil?

Solución

dotCloud doesn't provide full version control system like features (though the last few pushes are stored for a quick recovery due to a bad push), so it is not recommended to make changes to a running service because, as you've already mentioned, once you push again the changes you've made are effectively gone from your service image. In general, you should work locally, test locally, push, test, then repeat the cycle.

It's not clear what you've installed, so depending on what you've done manually, the approach might vary.

  • If you've apt-get installed something, you'll need to add that to your dotCloud.yml using the systempackages directive. See the build file docs for more info.
  • If it's code changes you've made, you can ssh into your service using dotcloud run -A <appname> <servicename>.<instance> and either copy the files one at a time or tar it up and pull it from your service manually. There's more information in the dotCloud copy guide on how to move files from and to a dotcloud service.
  • If you've pip installed a dependency, you'll need to add these to your requirements.txt file locally and it will be picked up with the next push.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top