This stack container the following services: Nginx, MySQL and PHP-FPM.
PHP Dockerized gives you everything you need for developing PHP applications locally. The idea came from the need of having an OS-agnostic and virtualized alternative to the great MNPP stack as regular LAMP stacks quite simply can't keep up with the Nginx + PHP-FPM/HHVM combo in terms of performance. I hope you'll find it as useful an addition to your dev-arsenal as I've found it!
- Docker Engine
- Docker Compose
- Docker Machine (Mac and Windows only)
Set up a Docker Machine and then run in background (inside you docker path):
$ docker-compose up -d
Enter in specific container
$ docker exec -ti [container name] /bin/bash
Simply build containers
$ docker-compose build
Build containers and set them up to get them running in background
$ docker-compose up -d --build
Restart all containers at once
$ docker-compose restart
Restart one or more specific containers
$ docker-compose restart [container name] [container name] ...
If you need to customize some data in docker-compose.yml, DO NOT CHANGE the file. Instead, create a new file called docker-compose-custom.yml and add your changes to it. The new file will extend default docker-compose.yml file. (See: https://docs.docker.com/compose/extends/). This way you don't need to merge docker-compose.yml when update your php-dockerized files with last updates.
That's it! You can now access your configured sites via the IP address of the Docker Machine or locally if you're running a Linux flavour and using Docker natively.
Copyright © 2017 MagedIn. Licensed under the terms of the MIT license.