September 29, 2016
Note: Part I here
Part II : Setting up a development environment for sofobomo.com
The question is, as a one-person team of sofobmo.com (until 2016 – when Matt joined me … Hi Matt!), how did I set up www.sofobomo.com, and how have I managed, updated, made changes to SoFoBoMo till now? Why, by myself of course. The site is live on a webhost. Any changes I need to make, I make it directly on the site itself – the production environment, so to speak? Are you cringing, shuddering reading this? You should be….
Crazily, until I started my job as a front end engineer, I never realized the magnitude of my mistake. No development environment, no version control, none of these safeties for my baby! (Shudder…)
Back in July, when SoFoBoMo 2016 started, I vowed to myself this would change. Because Matt joined Sofobomo, and it doesn’t help a team when one person makes random changes on the website – just to try things out. And also because of the massive UI changes we need to make to the website for Sofobomo 2017 – make the site responsive, add Facebook integration, add beautiful forums, some voting scheme and other features.
So I spent some time in September, setting up a development environment on my Macbook. I had, in the past tried to use the MAMP stack, but never actually got it completely functioning – mostly because I was not as motivated. This time however, I was as highly motivated as can be, and was commited to a development environment. As of writing this, the Drupal official site seems to recommend using Virtual Box and a pre-made Vagrant setup. I decided to try this out and use Drupal-VM.
The setup was super easy – following the instructions in the quick start guide. I downloaded my production site files, downloaded the current database from the production site using the Backup and Migrate module. I then downloaded and installed Virtual Box, Vagrant and Ansible. As per the instructions, I made a copy and updated the config.yml file to point to my downloaded codebase (Drupal files) (and disabled installing a fresh Drupal instance). I also updated the config file with the downloaded database details, and enabled Adminer as one of the development dependencies. Then a “vagrant up” on the command line and waiting for everything to be installed. And finally adding the VM IP address to my hosts file and I was ready to go. Simple, easy. In fact, much easier than what I was expecting. Now, if only my shared web hosting provider would enable Drush so I can just push updates via the command line!
And so, that’s how I have a development environment for www.sofobomo.com. Pair it with version control with Git and backup the files in bitbucket or github, and I am ready to start making changes for SoFoBoMo 2017!
Suprada Urval's blog.