Hi there,
I'm posting to share my development setup and to share some thoughts about it. The idea is to show and tell and if you have your own custom stuff please share what you like (and hate) about it.
While I know that setup a production server is quite straightforward, development rigs are different. Usually, you include stuff like xDebug and most of the time you need quick changes. The idea is to develop fast and not spend 5 minutes changing the PHP version or something like that.
Wampserver (Windows)
About 5 years I used WAMP server which worked pretty nice before the PHP 5.4 era. Basically is a package that includes PHP + Apache binaries and using a menu on the taskbar you can control everything.
Pros
Devserver (Windows)
EasyPHP provides a product called devserver which is way more pluggable than wampserver as you can download different servers and libraries. You configure it via web and it gets frequent updates. They ask for a $10/year fee to access to all the pluggable stuff so it is really cheap for what you get.
Pros
Vagrant (Multi)
Rather than relying on binaries, Vagrant uses virtualization to spawn a development environment. I checked Scotch Box which is a ready-to-go LAMP/LEMP stack but you can find countless stacks online. Basically, you get a virtualized machine configured as a development server.
Pros
Docker (Multi, Windows 10 Pro)
This is like the evolution of Vagrant in the form of containers. It is really amazing how Docker works and how easy deals with containers. Basically, it is a shared kernel but you define each component as a container. So you get a PHP container, an Apache container, MySQL and so on. Each container links based on your need which you can configure in a docker-compose file.
The power of the compose file is that you can target any container (remote) or even build your own container from scratch. This gives you full control with ease and since is a simple YAML file, you can create a bat or shell script that allows you to change PHP on the fly and issue all the commands on the fly.
Pros
So I have a Windows dev environment based on Devserver and I use docker to test the thing before going into the wild.
Hope it helps, feel free to share your thoughts and don't hesitate to share your development setup.
Cheers,
Rodolfo.
I'm posting to share my development setup and to share some thoughts about it. The idea is to show and tell and if you have your own custom stuff please share what you like (and hate) about it.
While I know that setup a production server is quite straightforward, development rigs are different. Usually, you include stuff like xDebug and most of the time you need quick changes. The idea is to develop fast and not spend 5 minutes changing the PHP version or something like that.
Wampserver (Windows)
About 5 years I used WAMP server which worked pretty nice before the PHP 5.4 era. Basically is a package that includes PHP + Apache binaries and using a menu on the taskbar you can control everything.
Pros
- Easy and reliable, it just works
- You configure everything from just one menu (multi-level menu)
- They take a lot of time to build the binaries for newer versions, so you won't be able to play with the latest PHP unless you get the binaries on your own (probably you will need to compile it on your own)
- You can't download extras (official stuff)
Devserver (Windows)
EasyPHP provides a product called devserver which is way more pluggable than wampserver as you can download different servers and libraries. You configure it via web and it gets frequent updates. They ask for a $10/year fee to access to all the pluggable stuff so it is really cheap for what you get.
Pros
- Multiple servers (of any kind)
- Easy configure an extend (check the warehouse)
- I really miss the toolbar menu with access to all options. To configure this thing you have to go to the web dashboard and spend some time on it.
- Some hard-coded variables like each vhost have a fixed prefix (edsa-) and stuff like that. Not a big deal for some, you can do this trick.
- Hardcoded ports (I like my own custom ports if possible).
Vagrant (Multi)
Rather than relying on binaries, Vagrant uses virtualization to spawn a development environment. I checked Scotch Box which is a ready-to-go LAMP/LEMP stack but you can find countless stacks online. Basically, you get a virtualized machine configured as a development server.
Pros
- No windows binaries, everything runs on Linux and yes, is not the same Windows/Linux on PHP
- You get a production-like environment from scratch
- No GUI. Everything gets made via command line
- Slow hard drive speed. This was dead-end for me, it is ridiculously slow on Windows
Docker (Multi, Windows 10 Pro)
This is like the evolution of Vagrant in the form of containers. It is really amazing how Docker works and how easy deals with containers. Basically, it is a shared kernel but you define each component as a container. So you get a PHP container, an Apache container, MySQL and so on. Each container links based on your need which you can configure in a docker-compose file.
The power of the compose file is that you can target any container (remote) or even build your own container from scratch. This gives you full control with ease and since is a simple YAML file, you can create a bat or shell script that allows you to change PHP on the fly and issue all the commands on the fly.
Pros
- Docker compose (easy to manage containers)
- Powerful tools like command line access to logs and stuff like that
- On Windows, you get Kitematict which is a GUI for containers
- You can map any folder and it works really fast
- Binds to PowerShell so you can do any kind of script for getting the server up, down, destroy, everything
- On my setup, I got issues when running docker and turning off my computer. It seems to be a known issue since SEP 2017 and everytime that it happens, I've to remove everything and restart Docker. Is quite annoying on a daily basis
- It needs Powershell so it won't work on Windows 10 Home
So I have a Windows dev environment based on Devserver and I use docker to test the thing before going into the wild.
Hope it helps, feel free to share your thoughts and don't hesitate to share your development setup.
Cheers,
Rodolfo.