Reputation: 1718
I'm tasked with maintaining several web apps, all of them using the LAMP stack. Some of them run on PHP 5.6, some of them on PHP 7.0, some using Wordpress, some using Symfony... Ideally, I'd like to set up at home testing/development environments that are as identical possible as the production ones.
I've been investigating Docker (warning: total novice here!) to see if it suits my needs. I'll be working on Windows and Mac, and I'd like to have in my machine several LAMP environments, each of them with their version of PHP/MySQL/etc., isolated from each other and all of them running in the same VM (because otherwise I might as well just use what I'm familiar with and set up different VMs). Can Docker do this?
(Sorry if this sounds like a silly question: reading about Docker, my impression was that the container philosophy allowed you precisely to do what I described without wasting resources like with VMs, and yet, I haven't found any guides about running more than one LAMP environment at the same time).
Upvotes: 2
Views: 288
Reputation: 1718
Okay, after a lot of time, I thought I should share the solution I found and that I'm currently using: devilbox. It's awesome, and once you get your head around it, it's incredibly powerful, flexible and customisable.
Upvotes: 0
Reputation: 13064
Php Docker stack to run Php Apps in Production and Development, using Docker Compose Services to run any Php version, Databases, Cache, Queues, Logs and much more...
From now on, no need to keep messing around the Operating System to have a full development stack ready to build our awesome Php Apps.
It can be included in each php project via composer:
https://packagist.org/packages/exadra37-docker/php-docker-stack
Or if you prefer you can clone it directly from here.
It comes with some default images for each service but is all configurable via .env
, thus we can pass any docker image we want for any of the supported services in the docker compose file.
Php Docker Stack Services:
- Http - Nginx, Apache, etc.
- Php - Php-Fpm.
- Database - Perconna, MariaDB, Mysql, etc.
- Cache - Redis, MemCached, etc.
- Logs - Logstash -> ElasticSearch <- Kibana.
- Queue - Beenstalkd, RabbitMQ, ActiveMQ, Apache Kafka, etc.
- Cron Jobs - Just to schedule cron jobs.
- Dev CLI - Access to the container shell.
- Database CLI - Like the awesome mycli propmt for mysql.
- Cache CLI - Like the redis cli.
I was using it daily at my old job for development.
I am the author of it and I have some local enhancements that need to be polished and merged upstream.
Feel free to try it and reach to me for any doubts or feedback.
Upvotes: 3