Antonio Carlos Ribeiro has a new post outlining steps to take if you want to use composer on a small 512mb box.
I ran into this myself for my side projects and I just went with the next bigger box. So that is a solution as well.
Some great tips none the less.