Local Development vs Development droplet

June 25, 2014 4k views

I am used to developing on a live server and making changes directly to the production server. <--(I know not a good idea, but that's what i have been doing for years)
I want to change this using digital ocean.

I'm looking for advice on how to implement a good environment. Keep in mind, i'm not working with a lot of other developers and most are small apps and some client websites.

Many posts say to implement a local machine development environment > push to github > then deploy to live/production server.

I understand the local dev environment(mac), but i have about 4 different computers i work off of on any given day(laptop at home, Imac at work 1, different imac at work 2, and another imac at home incase I don't want to use my laptop. My point is, I hate being tied to one machine, so local dev environment has never been good for me.

My thought was to create two droplets, one for dev and another for production, with github in the middle for version control.

My question is....does this make sense? Is there anyone else doing it this way or should I be using local dev on all of my machines?

Any help would be appreciated. Thanks

4 Answers

Hi bburnsworth,

I would recommend that you create two droplets - 1 Production Droplet and 1 Development Droplet, The reason why I say this is: 1. I've seen myself when deploying applications - They will work fine in your local work/home environment on your local network but as soon as you publish to a Production Server there is an issue with some variable in the Operating System and can cause your whole production server to crash. 2. Noting that you like to jump around from machine to machine.

I don't know your environment scenario.
I'm using PHP and MySQL for all my projects, some have frameworks, some don't.
They key is: PHP provides 'Dependency Manager' from Composer. So.. wherever i move my application, Composer will take care of all libraries i need to run my app, install and keep everything up to date.
Not just PHP, but Ruby also provide cool stuffs like that and sure other languages/platforms do so.

I really <strong>never</strong> (yeah, <strong>never</strong>, <strong>never</strong>, <strong>never</strong>..) had to worry about development and productions servers.

Also, i work with identical production/development environment (same specs, different servers). So, when developing I can get all possible problems, fix then in production server (install modules, change configs) and after that i get everything ready to production.

Let us know more about you languages, servers and other cool stuffs :)

Thanks guys.
I am using php and mysql mostly on ubuntu servers...Some CMS's for client websites and Laravel framework for applications.

I'm leaning toward two identical droplets (dev & production). I have also been looking into vagrant for a local development environment as well, but given that i bounce around from machine to machine a lot, it's probably not the best solution.

  • Hi bburnsworth,

    Regarding your last point ("given that i bounce around from machine to machine a lot, it's probably not the best solution."), I just wanted to point out that if you make a point to git commit / git push when you're finished developing on one machine, and then a git pull / git merge when picking up your work somewhere else, you won't have any issues. If your vagrant VM is the same configuration across machines (which it should be as that's half the point of vagrant), git will just pull down whatever updates/changes you committed. :-)

Have another answer? Share your knowledge.