How or which could be the best way to build a local development environment for a PHP + Nginx + PostgreSQL setup? I will start working on an app hosted on an AWS and am using Pycharm + Git for VCS control, but everything directly in the production evironment. I would like to setup a local development environment so that I can achieve the following workflow:

Git: master --> Development production --> Production branch

  1. Checkout from Git production branch so the live application is working.
  2. If there is need for a modification or additional development:

    • Develop changes in pycharm.
    • Push to master (development).
    • Test changes in my local dev environment.
  3. If changes are ok, merge master with production branch.
  4. Continue using the application normally.

My production server is an aws with Ubuntu 16.04

I have though about just getting a t2.micro aws instance and use it only for development purposes, I guess I can setup exactly the same as with the actual production setup, but I was wondering if it is possiblle to do this locally.

  • 1
    You could set up an Ubuntu VM running the same stack that your production server uses. That way, you'll also run into most bugs caused by your prod setup without running a separate testing server (i.e. your local nginx version handling stuff slightly different to the prod version).
    – duckstep
    Dec 29 '16 at 16:06
  • Great idea, I'm a bit concerned about the performance of my pc though. The application currently runs fine on the t2.micro instance, should my computer should be anough as well right?
    – johan855
    Dec 29 '16 at 16:08
  • t2.micro is 1 core / 1GiB RAM. Double that to make the VM powerful enough to also run X and your dev tools. How that translates to your pc depends on your hardware. Anything from a core2duo up with 2GiB (probably 3, depending on how much memory Windows needs) or more RAM should be able to handle this. If you need more performance, you could also dual-boot, but from what i've heard that's somewhat more tricky to set up with w10, because w10 doesn't really shutdown by default.
    – duckstep
    Dec 29 '16 at 16:17
  • On a side note, pick one of the "light" flavors (like Xubuntu) if you're worried about performance. The server tools (nginx, postgres, ...) are the same for all flavors.
    – duckstep
    Dec 29 '16 at 16:30
  • 1
    Your question is about runng on w10. My comment does not cover that, so it's not an answer to your question. Plus, having zero answers increases the chance that someone with a better knowledge of developing on w10 will post an answer later on.
    – duckstep
    Dec 29 '16 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.