How to deploy to a single specific server using Capistrano

I ended up posting a question on the capistrano users list here, and got the following response from Jamis (edited a bit by me here for clarity): Try the HOSTS environment variable: cap HOSTS=app2.example.com production deploy Note that doing this will treat app2 as being in every role, not just whichever role(s) it happens to … Read more

How to detect why Ansible playbook hangs during execution

Most Probable cause of your problem would be SSH connection. When a task requires a long execution time SSH timeouts. I faced such problem once, in order to overcome the SSH timeout thing, create a ansible.cfg in the current directory from which your are running Ansible add the following: [ssh_connection] ssh_args = -o ServerAliveInterval=n Where … Read more

How to edit code in a Docker container in development?

I found the best way to edit code in development is install everything as usual (including cloning your app’s repository), but move all the code in the container to say /srv/myapp.deploy.dev. Then start the container with a rw volume for /srv/myapp, and a init.d script that cleans that volume and copies the new contents inside … Read more

How do you use pip, virtualenv and Fabric to handle deployment?

“Best practices” are very context-dependent, so I won’t claim my practices are best, just that they work for me. I work on mostly small sites, so no multiple-server deployments, CDNs etc. I do need to support Webfaction shared hosting deployment, as some clients need the cheapest hosting they can find. I do often have to … Read more