To start this basic LEMP stack:
docker stack deploy -c docker-compose.yml sunshine
To take the stack down:
docker stack rm sunshine
Sample Web Folder:
- public_html/ : This folder is mapped to the container and will update as you modify the files within it directly.
Sample docker-compose files:
- docker-compose.yml : Basic LEMP stack
- docker-compose-clientA.yml : Modified stack for client with alternate php version
- docker-compose-custom-php.yml : Modified stack with custom php image that has the MySQLi extension enabled
- docker-compose-with-selenium.yml : LEMP stack with services defined for chrome and firefox selenium images
- docker-compose-portainer.yml : The Portainer stack for managing docker stack via gui
Sample custom php extension enabled Dockerfiles:
(For build instructions, see the Readme file in the php-image-options folder. Alternately you can pull the images from here: https://hub.docker.com/r/dhluther/php/ )
- php-image-options/Dockerfile-7-fpm : Base PHP 7-fpm image with the MySQLi extension enabled
- php-image-options/Dockerfile-7-fpm-all-the-goodies : Base PHP 7-fpm image with the MySQLi, mcrypt, zip, and iconv
Additional Files:
- mysite.conf : Sample nginx configuration for this application
- mysite2.conf : Sample nginx configuration with alternate default index file
- root_db_password.txt : Secret file for the mysql image
- composer.json : Sample composer file
See https://store.docker.com/images/composer
docker run --rm -it --volume $PWD:/app composer install