Browse Source

Major updates, see CHANGELOG for details

Mark Shust 6 years ago
parent
commit
b6c2989999
47 changed files with 159 additions and 1403 deletions
  1. 26 0
      CHANGELOG.md
  2. 30 98
      README.md
  3. 47 0
      SETUP.md
  4. 0 14
      compose/magento-1/.vscode/launch.json
  5. 0 2
      compose/magento-1/bin/bash
  6. 0 3
      compose/magento-1/bin/cli
  7. 0 3
      compose/magento-1/bin/clinotty
  8. 0 2
      compose/magento-1/bin/composer
  9. 0 5
      compose/magento-1/bin/download
  10. 0 8
      compose/magento-1/bin/fixperms
  11. 0 2
      compose/magento-1/bin/grunt
  12. 0 31
      compose/magento-1/bin/initloopback
  13. 0 2
      compose/magento-1/bin/mage
  14. 0 2
      compose/magento-1/bin/node
  15. 0 2
      compose/magento-1/bin/npm
  16. 0 2
      compose/magento-1/bin/remove
  17. 0 3
      compose/magento-1/bin/restart
  18. 0 2
      compose/magento-1/bin/start
  19. 0 2
      compose/magento-1/bin/stop
  20. 0 10
      compose/magento-1/bin/xdebug
  21. 0 3
      compose/magento-1/composer
  22. 0 5
      compose/magento-1/env/db.env
  23. 0 3
      compose/magento-1/images/nginx/Dockerfile
  24. 0 42
      compose/magento-1/images/nginx/conf/default.conf
  25. 0 1
      compose/magento-1/src/.gitignore
  26. 0 3
      compose/magento-2/bin/copydir
  27. 0 12
      compose/magento-2/bin/copydirall
  28. 10 0
      compose/magento-2/bin/copyfromcontainer
  29. 10 0
      compose/magento-2/bin/copytocontainer
  30. 3 0
      compose/magento-2/bin/fixowns
  31. 1 1
      compose/magento-2/bin/rootnotty
  32. 16 2
      compose/magento-2/bin/setup
  33. 1 7
      compose/magento-2/bin/start
  34. 9 32
      compose/magento-2/docker-compose.dev.yml
  35. 5 30
      compose/magento-2/docker-compose.yml
  36. 1 1
      images/nginx/1.13/conf/default.conf
  37. 0 68
      images/php/5.6/Dockerfile
  38. 0 4
      images/php/5.6/bin/cronstart
  39. 0 31
      images/php/5.6/conf/php-fpm.conf
  40. 0 13
      images/php/5.6/conf/php.ini
  41. 0 413
      images/php/5.6/conf/www.conf
  42. 0 74
      images/php/7.0/Dockerfile
  43. 0 7
      images/php/7.0/bin/cronstart
  44. 0 31
      images/php/7.0/conf/php-fpm.conf
  45. 0 13
      images/php/7.0/conf/php.ini
  46. 0 413
      images/php/7.0/conf/www.conf
  47. 0 1
      lib/onelinesetup

+ 26 - 0
CHANGELOG.md

@@ -8,6 +8,32 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
 
 - N/A
 
+## [21.0.0] - 2018-12-24
+
+🎅 Santa Shust wishes you a very Merry Christmas!
+
+### Changed
+- 💯 performance improvements (14 second load times now take 7 seconds!)
+  - The `bin/start` helper script no longer copies docker volumes introduced in version 18.0.0. The `docker-compose.yml` setup has been updated to only reference native Docker volumes. A new `docker-compose.dev.yml` file has been added to reference development-specific settings, including host bind mounts. Only `.composer`, `app/code`, `app/design`, `app/etc`, `composer.json`, `composer.lock`, and `nginx.conf` filesystem locations are host bind mounted. Being very specific in which files and folders are being mounted leads to drastically faster response times. The main culprit in performance penalties before was mounting `generated` and `var` folders as host bind mounts. These directories are considered "caching" folders and should never be host bind mounted.
+  - If you need access to specific files that are created within the container and are not host bind mounted, you can use `bin/cli` or `bin/bash` commands to go into the container to access the files. You can also use the new `bin/copyfromcontainer` and `bin/copytocontainer` bin helper scripts to copy files & folders from or to containers.
+  - If you need to host bind mount files or folders, feel free to do so within the `docker-compose.dev.yml` file! Just be aware there is a performance penalty for doing so.
+- Updated `nginx` Docker image to look for `nginx.conf` file instead of `nginx.conf.sample` file. This will now require copying the `nginx.conf.sample` file to `nginx.conf`, or using a host bind mount. This location allows overrides that aren't overridden when you upgrade Magento, and allow customizations for projects. Tagged new image as `markoshust/magento-nginx:1.13-7`.
+- The `bin/setup` helper script uses ohly the `docker-compose.yml` file, with only native docker volume mounts.
+- The `bin/start` helper script uses both `docker-compose.yml` and `docker-compose.dev.yml` files. Development-only specifications should now be placed within `docker-compose.dev.yml`, such as host bind volume mounts.
+- The `docker-compose.yml` file now uses a `sockdata` volume mount to mount the `/sock` directory. You may need to delete the `appdata` volume mount (`docker volume rm NAME`) and rebuild it with `bin/copytocontainer --all`.
+- Removed call to `bin/fixperms` within `bin/setup` to speed up initial installation.
+
+### Added
+- Added `bin/copyfromcontainer` and `bin/copytocontainer` helper scripts to copy folders or files from or to containers. Specify the `--all` option to copy entire web directory structure.
+- Added `bin/rootnotty` to run root commands with no TTY (needed for unassisted one-line setup with new volume setup).
+- Added `bin/fixowns` to fix filesystem ownerships within the Docker container.
+- Added `docker-compose.dev.yml` file for development-only specifications.
+
+### Removed
+- The Magento 1 version of this development environment has been deprecated and is no longer supported. PHP 5 was used as it's base, and that version has reached end-of-life. If you still wish to use this setup, please reference [compose/magento-1 on tag 20.1.1](https://github.com/markoshust/docker-magento/tree/master/compose/magento-1), but please be aware these images are no longer maintained.
+- The PHP 5.6 and 7.0 images have been deprecated, as both of these versions have reached end-of-life. These versions have been removed from the README and are no longer maintained. If you still wish to use these images, please reference the [README on tag 20.1.1](https://github.com/markoshust/docker-magento/blob/master/README.md), but please be aware these images are no longer maintained.
+- Removed `bin/copydir` and `bin/copydirall` helper scripts.
+
 ## [20.1.1] - 2018-12-10
 
 ### Fixed

+ 30 - 98
README.md

@@ -2,7 +2,7 @@
 
 <div align="center">
   <p>Mark Shust's Docker Configuration for Magento</p>
-  <img src="https://img.shields.io/badge/magento-1.X%20|%202.X-brightgreen.svg?logo=magento&longCache=true&style=flat-square" alt="Supported Magento Versions" />
+  <img src="https://img.shields.io/badge/magento-2.X-brightgreen.svg?logo=magento&longCache=true&style=flat-square" alt="Supported Magento Versions" />
   <a href="https://hub.docker.com/r/markoshust/magento-nginx/" target="_blank"><img src="https://img.shields.io/docker/pulls/markoshust/magento-nginx.svg?label=nginx%20docker%20pulls" alt="Docker Hub Pulls - Nginx" /></a>
   <a href="https://hub.docker.com/r/markoshust/magento-php/" target="_blank"><img src="https://img.shields.io/docker/pulls/markoshust/magento-php.svg?label=php%20docker%20pulls" alt="Docker Hub Pulls - PHP" /></a>
   <a href="https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity" target="_blank"><img src="https://img.shields.io/badge/maintained%3F-yes-brightgreen.svg?style=flat-square" alt="Maintained - Yes" /></a>
@@ -25,7 +25,8 @@ View Dockerfiles:
 
 - [markoshust/magento-nginx (Docker Hub)](https://hub.docker.com/r/markoshust/magento-nginx/)
   - 1.13
-      - [`latest`, `1.13`, `1.13-6`](https://github.com/markoshust/docker-magento/tree/master/images/nginx/1.13)
+      - [`latest`, `1.13`, `1.13-7`](https://github.com/markoshust/docker-magento/tree/master/images/nginx/1.13)
+      - [`1.13-6`](https://github.com/markoshust/docker-magento/tree/20.1.1/images/nginx/1.13)
       - [`1.13-5`](https://github.com/markoshust/docker-magento/tree/18.1.1/images/nginx/1.13)
       - [`1.13-4`](https://github.com/markoshust/docker-magento/tree/18.0.1/images/nginx/1.13)
       - [`1.13-3`](https://github.com/markoshust/docker-magento/tree/15.0.1/images/nginx/1.13)
@@ -46,50 +47,31 @@ View Dockerfiles:
       - [`7.1-fpm-2`](https://github.com/markoshust/docker-magento/tree/13.0.0/images/php/7.1)
       - [`7.1-fpm-1`](https://github.com/markoshust/docker-magento/tree/11.1.5/images/php/7.1)
       - [`7.1-fpm-0`](https://github.com/markoshust/docker-magento/tree/11.0.0/images/php/7.1)
-  - 7.0
-      - [`7.0-fpm`, `7.0-fpm-9`](https://github.com/markoshust/docker-magento/tree/master/images/php/7.0)
-      - [`7.0-fpm-8`](https://github.com/markoshust/docker-magento/tree/17.0.1/images/php/7.0)
-      - [`7.0-fpm-7`](https://github.com/markoshust/docker-magento/tree/16.2.0/images/php/7.0)
-      - [`7.0-fpm-6`](https://github.com/markoshust/docker-magento/tree/16.0.0/images/php/7.0)
-      - [`7.0-fpm-5`](https://github.com/markoshust/docker-magento/tree/15.0.1/images/php/7.0)
-      - [`7.0-fpm-4`](https://github.com/markoshust/docker-magento/tree/15.0.0/images/php/7.0)
-      - [`7.0-fpm-3`](https://github.com/markoshust/docker-magento/tree/14.0.1/images/php/7.0)
-      - [`7.0-fpm-2`](https://github.com/markoshust/docker-magento/tree/13.0.0/images/php/7.0)
-      - [`7.0-fpm-1`](https://github.com/markoshust/docker-magento/tree/11.1.5/images/php/7.0)
-      - [`7.0-fpm-0`](https://github.com/markoshust/docker-magento/tree/11.0.0/images/php/7.0)
-  - 5.6
-      - [`5.6-fpm`, `5.6-fpm-6`](https://github.com/markoshust/docker-magento/tree/master/images/php/5.6)
-      - [`5.6-fpm-5`](https://github.com/markoshust/docker-magento/tree/15.0.1/images/php/5.6)
-      - [`5.6-fpm-4`](https://github.com/markoshust/docker-magento/tree/15.0.0/images/php/5.6)
-      - [`5.6-fpm-3`](https://github.com/markoshust/docker-magento/tree/14.0.1/images/php/5.6)
-      - [`5.6-fpm-2`](https://github.com/markoshust/docker-magento/tree/13.0.0/images/php/5.6)
-      - [`5.6-fpm-1`](https://github.com/markoshust/docker-magento/tree/11.1.5/images/php/5.6)
-      - [`5.6-fpm-0`](https://github.com/markoshust/docker-magento/tree/11.0.0/images/php/5.6)
 
 ## Usage
 
-This configuration is intended to be used as a Docker-based development environment for both Magento 1 and Magento 2.
+This configuration is intended to be used as a Docker-based development environment for Magento 2.
 
 Folders:
 
 - `images`: Docker images for nginx and php
 - `compose`: sample setups with Docker Compose
 
-Nginx assumes you are running Magento 2, however you can easily run it with Magento 1 using [the provided configuration file](https://github.com/markoshust/docker-magento/blob/master/images/nginx/1.13/conf/default.magento1.conf). Here is an [example of this setup with Docker Compose](https://github.com/markoshust/docker-magento/tree/master/compose/magento-1).
-
-The PHP images are fairly agnostic to which version of Magento you are running. The PHP 5 images do assume you are running Magento 1, and the PHP 7 images do assume you are running Magento 2, however the main difference is cronjob setup, and they can be easily modified for inverse usage.
+> The Magento 1 version of this development environment has been deprecated and is no longer supported. PHP 5 was used as it's base, and that version has reached end-of-life. If you still wish to use this setup, please reference [compose/magento-1 on tag 20.1.1](https://github.com/markoshust/docker-magento/tree/master/compose/magento-1), but please be aware these images are no longer maintained.
 
 ## Prerequisites
 
 This setup assumes you are running Docker on a computer with at least 4GB of allocated RAM, a dual-core, and an SSD hard drive. [Download & Install Docker Community Edition](https://www.docker.com/community-edition#/download).
 
-This configuration has been tested on Mac, Linux and Windows.
+This configuration has been tested on Mac & Linux.
+
+> **Windows Configurations**: The Windows configuration does not currently work and is in need of a contributor to get functional once again. Please see [issue 100](https://github.com/markoshust/docker-magento/issues/100) to contribute.
 
 ## Quick Setup
 
 ### Automated Setup (New Project)
 
-> Magento 2, OS X & Linux Only
+> macOS & Linux Only
 
 Run this automated one-liner from the directory you want to install your project to:
 
@@ -99,17 +81,19 @@ curl -s https://raw.githubusercontent.com/markoshust/docker-magento/master/lib/o
 
 The `magento2.test` above defines the hostname to use, and the `2.3.0` defines the Magento version to install. Note that since we need a write to `/etc/hosts` for DNS resolution, you will be prompted for your system password during setup.
 
-After the one-liner above completes running, you should be able to access your site at `http://magento2.test`.
+After the one-liner above completes running, you should be able to access your site at `https://magento2.test`.
 
-### Manual Setup (New Project)
+### Manual Setup
 
-Same result as the one-liner above. Just replace `magento2.test` references with the hostname that you wish to setup.
+Same result as the one-liner above. Just replace `magento2.test` references with the hostname that you wish to use.
 
 ```
 # Quick setup for a new instance of Magento 2:
 curl -s https://raw.githubusercontent.com/markoshust/docker-magento/master/lib/template|bash -s -- magento-2
 
+# New projects can easily download by version:
 bin/download 2.3.0
+
 # or if you'd rather install with Composer, run:
 #
 # OPEN SOURCE:
@@ -122,87 +106,34 @@ bin/download 2.3.0
 # rm -rf src
 # composer create-project --repository=https://repo.magento.com/ --ignore-platform-reqs magento/project-enterprise-edition=2.3.0 src
 
-echo "127.0.0.1 magento2.test" | sudo tee -a /etc/hosts
-
-bin/start
-
-bin/setup magento2.test
-
-open http://magento2.test
-```
-
-### Manual Setup (Existing Project)
-
-Just replace `magento2.test` references with the hostname that you wish to use.
-
-```
-# Quick setup for an existing instance of Magento 2
-curl -s https://raw.githubusercontent.com/markoshust/docker-magento/master/lib/template|bash -s -- magento-2
-
-# Replace the contents of /src with the source code of your existing Magento instance
+# Existing projects, instead of running the above replace the contents of /src with the source code of your existing Magento instance
 
 echo "127.0.0.1 magento2.test" | sudo tee -a /etc/hosts
 
-bin/start
+# For new setups:
+bin/setup magento2.test
 
-bin/composer install
+# For existing installations:
+# bin/start
+# bin/composer install
 
-open http://magento2.test
+open https://magento2.test
 ```
 
-## Setup a New Magento 2 Project
-
-1. Create the project template by going to the place you want the new project (ex. cd ~/Sites/magento2), then run
-	- `curl -s https://raw.githubusercontent.com/markoshust/docker-magento/master/lib/template|bash -s -- magento-2`
-
-2. Extract the contents of your current Magento site to the `src` folder, or download a fresh copy of the Magento source code for starting a new project with:
-    - `bin/download 2.3.0`
-
-3. Add an entry to your local hosts file with your custom domain. Assuming the domain you want to setup is `magento2.test`, enter the below. Be sure to use a `.test` tld, as `.localhost` and `.dev` will present issues with domain resolution.
-    - `echo "127.0.0.1 magento2.test" | sudo tee -a /etc/hosts`
-
-4. Start your Docker containers with the provided helper script:
-    - `bin/start`
-
-5. For new projects: run Magento's setup install process with the below helper script. Feel free to edit this file to your liking; at the very least you will probably need to update the `base-url` value to the domain you setup in step 3. Also, be sure to setup [Composer Authentication](https://github.com/markoshust/docker-magento#composer-authentication) before initiating the setup script.
-    - `bin/setup magento2.test`
-
-6. You may now access your site! Check out whatever domain you setup from within a web browser.
-    - `open http://magento2.test`
-
-## Setup a New Magento 2 Project (Windows)
-
-The following scripts are meant to run with Powershell. Note that the execution policy for scripts needs to be set accordingly [Execution policy](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-executionpolicy?view=powershell-6).
-
-1. Create the project template by going to the place you want the new project (ex. cd ~/Sites/magento2), then run
-	- `curl -s https://raw.githubusercontent.com/markoshust/docker-magento/master/lib/template|bash -s -- magento-2-windows`
-
-2. Extract the contents of your current Magento site to the `src` folder, or download a fresh copy of the Magento source code for starting a new project with the following line. Note that the default untar command is quite slow. If you want to speed that up install [7-Zip](http://www.7-zip.org/) and add it to your PATH. The script will automatically use 7-Zip if it is available:
-    - `bin/download 2.3.0`
-
-3. Copy magento into the docker container with `bin/copymagento`. This is needed because of permission restrictions of shared data in Windows (see [Troubleshooting Docker](https://docs.docker.com/docker-for-windows/troubleshoot/#permissions-errors-on-data-directories-for-shared-volumes)). The `app` folder will however be shared with Windows for ease of development. For this folder the default permission 755 works just fine.
-
-4. Add an entry to `C:\Windows\System32\drivers\etc\hosts` with your custom domain: `127.0.0.1 magento2.test` (assuming the domain  you want to setup is `magento2.test`). Be sure to use a `.test` tld, as `.localhost` and `.dev` will present issues with domain resolution.
-
-5. Start your Docker containers with the provided helper script:
-    - `bin/start`
-
-6. For new projects: run Magento's setup install process with the below helper script. Feel free to edit this file to your liking; at the very least you will probably need to update the `base-url` value to the domain you setup in step 4. Also, be sure to setup [Composer Authentication](https://github.com/markoshust/docker-magento#composer-authentication) before initiating the setup script.
-    - `bin/setup magento2.test`
-
-7. You may now access your site! Check out whatever domain you setup from within a web browser.
-    - `open http://magento2.test`
+> For more details on how everything works, see the extended [setup readme](https://github.com/markoshust/docker-magento/blob/master/SETUP.md).
 
 ## Custom CLI Commands
 
 - `bin/bash`: Drop into the bash prompt of your Docker container. The `phpfpm` container should be mainly used to access the filesystem within Docker.
 - `bin/dev-urn-catalog-generate`: Generate URN's for PHPStorm and remap paths to local host. Restart PHPStorm after running this command.
 - `bin/cli`: Run any CLI command without going into the bash prompt. Ex. `bin/cli ls`
+- `bin/clinotty`: Run any CLI command with no TTY. Ex. `bin/clinotty chmod u+x bin/magento`
 - `bin/composer`: Run the composer binary. Ex. `bin/composer install`
-- `bin/copydir`: Copy a directory from the container to the host. Ex. `bin/copydir vendor`
-- `bin/copydirall`: Copy all Magento directories from the container to the host. Ex. `bin/copydirall`
-- `bin/download`: Download a version of Magento to the `src` directory. Ex. `bin/download 2.3.0`
-- `bin/fixperms`: This will fix filesystem ownerships and permissions within Docker.
+- `bin/copyfromcontainer`: Copy folders or files from container to host. Ex. `bin/copyfromcontainer vendor`
+- `bin/copytocontainer`: Copy folders or files from host to container. Ex. `bin/copytocontainer --all`
+- `bin/download`: Download & extract specific Magento version to the `src` directory. Ex. `bin/download 2.3.0`
+- `bin/fixowns`: This will fix filesystem ownerships within the container.
+- `bin/fixperms`: This will fix filesystem permissions within the container.
 - `bin/grunt`: Run the grunt binary. Note that this runs the version from the node_modules directory for project version parity. Ex. `bin/grunt exec`
 - `bin/magento`: Run the Magento CLI. Ex: `bin/magento cache:flush`
 - `bin/node`: Run the node binary. Ex. `bin/node --version`
@@ -210,6 +141,7 @@ The following scripts are meant to run with Powershell. Note that the execution
 - `bin/remove`: Remove all containers. Ex. `bin/remove`
 - `bin/restart`: Stop and then start all containers. Ex. `bin/restart`
 - `bin/root`: Run any CLI command as root without going into the bash prompt. Ex `bin/root apt-get install nano`
+- `bin/rootnotty`: Run any CLI command as root with no TTY. Ex `bin/rootnotty chown -R app:app /var/www/html`
 - `bin/setup`: Run the Magento setup process to install Magento from the source code, with optional domain name. Defaults to `magento2.test`. Ex. `bin/setup magento2.test`
 - `bin/start`: Start all containers. This includes helper for bi-directional file sync, so be sure to use this instead of `docker-compose up -d`. Ex. `bin/start`
 - `bin/stop`: Stop all containers. Ex. `bin/stop`
@@ -219,7 +151,7 @@ The following scripts are meant to run with Powershell. Note that the execution
 
 ### Database
 
-- The hostname of each service is the name of the service within the `docker-compose.yml` file. So for example, MySQL's hostname is `db` (not `localhost`) when accessing it from within a Docker container. Elasticsearch's hostname is `elasticsearch`.
+The hostname of each service is the name of the service within the `docker-compose.yml` file. So for example, MySQL's hostname is `db` (not `localhost`) when accessing it from within a Docker container. Elasticsearch's hostname is `elasticsearch`.
 
 ### Composer Authentication
 

+ 47 - 0
SETUP.md

@@ -0,0 +1,47 @@
+# Setup
+
+## New Magento 2 Project (macOS/Linux)
+
+1. Create the project template by going to the place you want the new project (ex. cd ~/Sites/magento2), then run
+	- `curl -s https://raw.githubusercontent.com/markoshust/docker-magento/master/lib/template|bash -s -- magento-2`
+
+2. Extract the contents of your current Magento site to the `src` folder, or download a fresh copy of the Magento source code for starting a new project with:
+    - `bin/download 2.3.0`
+
+3. Add an entry to your local hosts file with your custom domain. Assuming the domain you want to setup is `magento2.test`, enter the below. Be sure to use a `.test` tld, as `.localhost` and `.dev` will present issues with domain resolution.
+    - `echo "127.0.0.1 magento2.test" | sudo tee -a /etc/hosts`
+
+4. Start your Docker containers with the provided helper script:
+    - `bin/start`
+
+5. For new projects: run Magento's setup install process with the below helper script. Feel free to edit this file to your liking; at the very least you will probably need to update the `base-url` value to the domain you setup in step 3. Also, be sure to setup [Composer Authentication](https://github.com/markoshust/docker-magento#composer-authentication) before initiating the setup script.
+    - `bin/setup magento2.test`
+
+6. You may now access your site! Check out whatever domain you setup from within a web browser.
+    - `open http://magento2.test`
+
+## New Magento 2 Project (Windows)
+
+> **Windows Configurations**: The Windows configuration does not currently work and is in need of a contributor to get functional once again. Please see [issue 100](https://github.com/markoshust/docker-magento/issues/100) to contribute.
+
+The following scripts are meant to run with Powershell. Note that the execution policy for scripts needs to be set accordingly [Execution policy](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-executionpolicy?view=powershell-6).
+
+1. Create the project template by going to the place you want the new project (ex. cd ~/Sites/magento2), then run
+	- `curl -s https://raw.githubusercontent.com/markoshust/docker-magento/master/lib/template|bash -s -- magento-2-windows`
+
+2. Extract the contents of your current Magento site to the `src` folder, or download a fresh copy of the Magento source code for starting a new project with the following line. Note that the default untar command is quite slow. If you want to speed that up install [7-Zip](http://www.7-zip.org/) and add it to your PATH. The script will automatically use 7-Zip if it is available:
+    - `bin/download 2.3.0`
+
+3. Copy magento into the docker container with `bin/copymagento`. This is needed because of permission restrictions of shared data in Windows (see [Troubleshooting Docker](https://docs.docker.com/docker-for-windows/troubleshoot/#permissions-errors-on-data-directories-for-shared-volumes)). The `app` folder will however be shared with Windows for ease of development. For this folder the default permission 755 works just fine.
+
+4. Add an entry to `C:\Windows\System32\drivers\etc\hosts` with your custom domain: `127.0.0.1 magento2.test` (assuming the domain  you want to setup is `magento2.test`). Be sure to use a `.test` tld, as `.localhost` and `.dev` will present issues with domain resolution.
+
+5. Start your Docker containers with the provided helper script:
+    - `bin/start`
+
+6. For new projects: run Magento's setup install process with the below helper script. Feel free to edit this file to your liking; at the very least you will probably need to update the `base-url` value to the domain you setup in step 4. Also, be sure to setup [Composer Authentication](https://github.com/markoshust/docker-magento#composer-authentication) before initiating the setup script.
+    - `bin/setup magento2.test`
+
+7. You may now access your site! Check out whatever domain you setup from within a web browser.
+    - `open http://magento2.test`
+

+ 0 - 14
compose/magento-1/.vscode/launch.json

@@ -1,14 +0,0 @@
-{
-  "version": "0.2.0",
-  "configurations": [
-    {
-      "name": "Listen for XDebug",
-      "type": "php",
-      "request": "launch",
-      "pathMappings": {
-        "/var/www/html": "${workspaceFolder}/src"
-      },
-      "port": 9001
-    }
-  ]
-}

+ 0 - 2
compose/magento-1/bin/bash

@@ -1,2 +0,0 @@
-#!/bin/bash
-bin/cli bash

+ 0 - 3
compose/magento-1/bin/cli

@@ -1,3 +0,0 @@
-#!/bin/bash
-[ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
-docker-compose exec phpfpm "$@"

+ 0 - 3
compose/magento-1/bin/clinotty

@@ -1,3 +0,0 @@
-#!/bin/bash
-[ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
-docker-compose exec -T phpfpm "$@"

+ 0 - 2
compose/magento-1/bin/composer

@@ -1,2 +0,0 @@
-#!/bin/bash
-bin/cli composer "$@"

+ 0 - 5
compose/magento-1/bin/download

@@ -1,5 +0,0 @@
-#!/bin/bash
-[ -z "$1" ] && echo "Please specify the version to download (ex. 1.9.3.7)" && exit
-curl -L http://pubfiles.nexcess.net/magento/ce-packages/magento-$1.tar.gz | tar xzf - -o -C .
-rm -rf src
-mv magento src

+ 0 - 8
compose/magento-1/bin/fixperms

@@ -1,8 +0,0 @@
-#!/bin/bash
-echo "Correcting filesystem permissions..."
-
-bin/cli find media var -type f -exec chmod u+w {} \;
-bin/cli find media var -type d -exec chmod u+w {} \;
-bin/cli chmod u+x mage
-
-echo "Filesystem permissions corrected."

+ 0 - 2
compose/magento-1/bin/grunt

@@ -1,2 +0,0 @@
-#!/bin/bash
-bin/cli node_modules/grunt/bin/grunt "$@"

+ 0 - 31
compose/magento-1/bin/initloopback

@@ -1,31 +0,0 @@
-#!/bin/bash
-
-################################################################################
-# macOS
-################################################################################
-sudo ifconfig lo0 alias 10.254.254.254 255.255.255.0
-sudo bash -c "curl https://raw.githubusercontent.com/markoshust/magento-docker/master/lib/com.network.alias.plist > /Library/LaunchDaemons/com.network.alias.plist"
-sudo chmod 0644 /Library/LaunchDaemons/com.network.alias.plist
-sudo chown root:wheel /Library/LaunchDaemons/com.network.alias.plist
-sudo launchctl load /Library/LaunchDaemons/com.network.alias.plist
-
-################################################################################
-# Fedora
-################################################################################
-# To enable immediately:
-#sudo ip addr add 10.254.254.254 dev lo label lo:0
-#
-# To persist after reboots:
-# edit file at /etc/sysconfig/network-scripts/ifcfg-lo:0 with the following configuration values:
-#
-#ISALIAS=yes
-#DEVICE=lo:0
-#ONBOOT=yes
-#BOOTPROTO=none
-#IPADDR=10.254.254.254
-#NETMASK=255.255.255.0
-#TYPE=Ethernet
-#
-# Aftewards, create the following symlinks:
-#ln /etc/sysconfig/network-scripts/ifcfg-lo:0 /etc/sysconfig/networking/devices/ifcfg-lo:0
-#ln /etc/sysconfig/network-scripts/ifcfg-lo:0 /etc/sysconfig/networking/profiles/default/ifcfg-lo:0

+ 0 - 2
compose/magento-1/bin/mage

@@ -1,2 +0,0 @@
-#!/bin/bash
-bin/cli mage "$@"

+ 0 - 2
compose/magento-1/bin/node

@@ -1,2 +0,0 @@
-#!/bin/bash
-bin/cli node "$@"

+ 0 - 2
compose/magento-1/bin/npm

@@ -1,2 +0,0 @@
-#!/bin/bash
-bin/cli npm "$@"

+ 0 - 2
compose/magento-1/bin/remove

@@ -1,2 +0,0 @@
-#!/bin/bash
-docker-compose rm

+ 0 - 3
compose/magento-1/bin/restart

@@ -1,3 +0,0 @@
-#!/bin/bash
-docker-compose stop
-docker-compose up -d

+ 0 - 2
compose/magento-1/bin/start

@@ -1,2 +0,0 @@
-#!/bin/bash
-docker-compose up -d

+ 0 - 2
compose/magento-1/bin/stop

@@ -1,2 +0,0 @@
-#!/bin/bash
-docker-compose stop

+ 0 - 10
compose/magento-1/bin/xdebug

@@ -1,10 +0,0 @@
-#!/bin/bash
-if [ "$1" == "disable" ]; then
-  bin/cli sed -i -e 's/^zend_extension/\;zend_extension/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
-  echo "Xdebug has been disabled."
-elif [ "$1" == "enable" ]; then
-  bin/cli sed -i -e 's/^\;zend_extension/zend_extension/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
-  echo "Xdebug has been enabled."
-else
-  echo "Please specify either 'enable' or 'disable' as an argument"
-fi

+ 0 - 3
compose/magento-1/composer

@@ -1,3 +0,0 @@
-#!/bin/bash
-[ -z "$1" ] && echo "Please specify a composer command (ex. install)" && exit
-docker-compose exec phpfpm composer "$@"

+ 0 - 5
compose/magento-1/env/db.env

@@ -1,5 +0,0 @@
-MYSQL_ROOT_PASSWORD=magento
-MYSQL_DATABASE=magento
-MYSQL_USER=magento
-MYSQL_PASSWORD=magento
-VIRTUAL_HOST=magento-1.9.3.7.test

+ 0 - 3
compose/magento-1/images/nginx/Dockerfile

@@ -1,3 +0,0 @@
-FROM markoshust/magento-nginx:1.13-6
-
-COPY ./conf/default.conf /etc/nginx/conf.d/

+ 0 - 42
compose/magento-1/images/nginx/conf/default.conf

@@ -1,42 +0,0 @@
-upstream fastcgi_backend {
-  server unix:/sock/docker.sock;
-}
-
-server {
-  listen 8000;
-  return 301 https://$host$request_uri;
-}
-
-server {
-  listen 8443 ssl;
-
-  ssl_certificate /etc/nginx/certs/nginx.crt;
-  ssl_certificate_key /etc/nginx/certs/nginx.key;
-
-  set $MAGE_ROOT /var/www/html;
-  set $MAGE_IS_DEVELOPER_MODE true;
-
-  root $MAGE_ROOT;
-
-  index index.php;
-  autoindex off;
-  charset off;
-
-  add_header 'X-Content-Type-Options' 'nosniff';
-
-  location / {
-    try_files $uri $uri/ /index.php?$args;
-  }
-  
-  location ~ cron\.php {
-    deny all;
-  }
-
-  location ~* \.php$ {
-    try_files $uri =404;
-    fastcgi_pass fastcgi_backend;
-    fastcgi_index index.php;
-    fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
-    include fastcgi_params;
-  }
-}

+ 0 - 1
compose/magento-1/src/.gitignore

@@ -1 +0,0 @@
-!.gitignore

+ 0 - 3
compose/magento-2/bin/copydir

@@ -1,3 +0,0 @@
-#!/bin/bash
-[ -z "$1" ] && echo "Please specify a directory to copy (ex. vendor)" && exit
-docker cp $(docker-compose ps|grep phpfpm|awk '{print $1}'):/var/www/html/$1 src/

+ 0 - 12
compose/magento-2/bin/copydirall

@@ -1,12 +0,0 @@
-#!/bin/bash
-bin/copydir app
-bin/copydir bin
-bin/copydir dev
-bin/copydir generated
-bin/copydir lib
-bin/copydir phpserver
-bin/copydir pub
-bin/copydir setup
-bin/copydir update
-bin/copydir var
-bin/copydir vendor

+ 10 - 0
compose/magento-2/bin/copyfromcontainer

@@ -0,0 +1,10 @@
+#!/bin/bash
+[ -z "$1" ] && echo "Please specify a directory or file to copy from container (ex. vendor, --all)" && exit
+
+if [ "$1" == "--all" ]; then
+  docker cp $(docker-compose ps|grep phpfpm|awk '{print $1}'):/var/www/html/./ src/
+  echo "Completed copying all files from container to host"
+else
+  docker cp $(docker-compose ps|grep phpfpm|awk '{print $1}'):/var/www/html/$1 src/
+  echo "Completed copying $1 from container to host"
+fi

+ 10 - 0
compose/magento-2/bin/copytocontainer

@@ -0,0 +1,10 @@
+#!/bin/bash
+[ -z "$1" ] && echo "Please specify a directory or file to copy to container (ex. vendor, --all)" && exit
+
+if [ "$1" == "--all" ]; then
+  docker cp src/./ $(docker-compose ps|grep phpfpm|awk '{print $1}'):/var/www/html/
+  echo "Completed copying all files from host to container"
+else
+  docker cp src/$1 $(docker-compose ps|grep phpfpm|awk '{print $1}'):/var/www/html/
+  echo "Completed copying $1 from host to container"
+fi

+ 3 - 0
compose/magento-2/bin/fixowns

@@ -0,0 +1,3 @@
+#!/bin/bash
+echo "Correcting filesystem ownerships..."
+bin/rootnotty chown -R app:app /var/www/html

+ 1 - 1
compose/magento-1/bin/root → compose/magento-2/bin/rootnotty

@@ -1,3 +1,3 @@
 #!/bin/bash
 [ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit
-docker-compose exec -u root phpfpm "$@"
+docker-compose exec -u root -T phpfpm "$@"

+ 16 - 2
compose/magento-2/bin/setup

@@ -1,4 +1,13 @@
 #!/bin/bash
+bin/stop
+
+docker-compose -f docker-compose.yml up -d
+
+echo "Copying all files from host to container..."
+bin/copytocontainer --all
+
+bin/fixowns
+
 bin/clinotty chmod u+x bin/magento
 
 BASE_URL=${1:-magento2.test}
@@ -19,9 +28,14 @@ bin/clinotty bin/magento setup:install \
   --timezone=America/New_York \
   --use-rewrites=1
 
-bin/fixperms
-
 echo "Turning on developer mode.."
 bin/clinotty bin/magento deploy:mode:set developer
 
 bin/clinotty bin/magento indexer:reindex
+
+bin/copyfromcontainer app
+
+echo "Restarting containers with host bind mounts..."
+bin/restart
+
+echo "Docker development environment setup complete."

+ 1 - 7
compose/magento-2/bin/start

@@ -1,8 +1,2 @@
 #!/bin/bash
-docker-compose up -d
-
-if [[ "$OSTYPE" != "linux-gnu" ]]; then
-  echo "Initiating bi-directional sync between host & containers..."
-  bin/copydirall
-  echo "All containers have started successfully."
-fi
+docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d

+ 9 - 32
compose/magento-1/docker-compose.yml → compose/magento-2/docker-compose.dev.yml

@@ -1,26 +1,21 @@
 # Mark Shust's Docker Configuration for Magento (https://github.com/markoshust/docker-magento)
-# Version 20.1.0
+# Version 21.0.0
 
 version: "3"
 
 services:
   app:
-    build: images/nginx
-    ports:
-      - "80:8000"
-      - "443:8443"
-    links:
-      - db
-      - phpfpm
     volumes: &appvolumes
-      - ./src:/var/www/html:delegated
+      # Host mounts with performance penalty, only put what is necessary here
       - ~/.composer:/var/www/.composer:delegated
-      - appdata:/sock
+      - ./src/app/code:/var/www/html/app/code:delegated
+      - ./src/app/design:/var/www/html/app/design:delegated
+      - ./src/app/etc:/var/www/html/app/etc:delegated
+      - ./src/composer.json:/var/www/html/composer.json:delegated
+      - ./src/composer.lock:/var/www/html/composer.lock:delegated
+      - ./src/nginx.conf.sample:/var/www/html/nginx.conf:delegated
 
   phpfpm:
-    image: markoshust/magento-php:5.6-fpm-6
-    links:
-      - db
     volumes: *appvolumes
     # Linux only: host.docker.internal doesn't exist https://github.com/docker/for-linux/issues/264
     # Uncomment two lines below & replace IP with result of: docker run --rm alpine ip route | awk 'NR==1 {print $3}'
@@ -29,28 +24,10 @@ services:
 
   # Disabling cron by default as it uses higher CPU, enable if needed
   #cron:
-  #  image: markoshust/magento-php:5.6-fpm-6
+  #  image: markoshust/magento-php:7.2-fpm-0
   #  user: root
   #  command: /usr/local/bin/cronstart
   #  tty: true
   #  links:
   #    - db
   #  volumes: *appvolumes
-
-  db:
-    image: percona:5.7
-    ports:
-      - "3306:3306"
-    env_file: env/db.env
-    volumes:
-      - dbdata:/var/lib/mysql
-
-  elasticsearch:
-    image: elasticsearch:5.6
-    ports:
-      - "9200:9200"
-      - "9300:9300"
-
-volumes:
-  appdata:
-  dbdata:

+ 5 - 30
compose/magento-2/docker-compose.yml

@@ -1,11 +1,11 @@
 # Mark Shust's Docker Configuration for Magento (https://github.com/markoshust/docker-magento)
-# Version 20.1.1
+# Version 21.0.0
 
 version: "3"
 
 services:
   app:
-    image: markoshust/magento-nginx:1.13-6
+    image: markoshust/magento-nginx:1.13-7
     ports:
       - "80:8000"
       - "443:8443"
@@ -13,41 +13,15 @@ services:
       - db
       - phpfpm
     volumes: &appvolumes
-      - ./src:/var/www/html:delegated
       - ~/.composer:/var/www/.composer:delegated
-      - appdata:/sock
-      # Linux only: comment the below volume mounts
-      - appdata:/var/www/html/app
-      - appdata:/var/www/html/bin
-      - appdata:/var/www/html/dev
-      - appdata:/var/www/html/generated
-      - appdata:/var/www/html/lib
-      - appdata:/var/www/html/phpserver
-      - appdata:/var/www/html/pub
-      - appdata:/var/www/html/setup
-      - appdata:/var/www/html/update
-      - appdata:/var/www/html/var
-      - appdata:/var/www/html/vendor
+      - appdata:/var/www/html
+      - sockdata:/sock
 
   phpfpm:
     image: markoshust/magento-php:7.2-fpm-0
     links:
       - db
     volumes: *appvolumes
-    # Linux only: host.docker.internal doesn't exist https://github.com/docker/for-linux/issues/264
-    # Uncomment two lines below & replace IP with result of: docker run --rm alpine ip route | awk 'NR==1 {print $3}'
-    #extra_hosts:
-    #  - "host.docker.internal:IP"
-
-  # Disabling cron by default as it uses higher CPU, enable if needed
-  #cron:
-  #  image: markoshust/magento-php:7.2-fpm-0
-  #  user: root
-  #  command: /usr/local/bin/cronstart
-  #  tty: true
-  #  links:
-  #    - db
-  #  volumes: *appvolumes
 
   db:
     image: percona:5.7
@@ -66,3 +40,4 @@ services:
 volumes:
   appdata:
   dbdata:
+  sockdata:

+ 1 - 1
images/nginx/1.13/conf/default.conf

@@ -15,5 +15,5 @@ server {
 
   set $MAGE_ROOT /var/www/html;
 
-  include /var/www/html/nginx.conf.sample;
+  include /var/www/html/nginx[.]conf;
 }

+ 0 - 68
images/php/5.6/Dockerfile

@@ -1,68 +0,0 @@
-FROM php:5.6-fpm
-MAINTAINER Mark Shust <mark@shust.com>
-
-RUN apt-get update && apt-get install -y \
-  cron \
-  git \
-  gzip \
-  libfreetype6-dev \
-  libicu-dev \
-  libjpeg62-turbo-dev \
-  libmcrypt-dev \
-  libpng-dev \
-  libxslt1-dev \
-  lsof \
-  mysql-client \
-  vim \
-  zip
-
-RUN docker-php-ext-configure \
-  gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
-
-RUN docker-php-ext-install \
-  bcmath \
-  gd \
-  intl \
-  mbstring \
-  mcrypt \
-  opcache \
-  pdo_mysql \
-  soap \
-  xsl \
-  zip
-
-RUN pecl channel-update pecl.php.net \
-  && pecl install xdebug-2.5.5 \
-  && docker-php-ext-enable xdebug \
-  && sed -i -e 's/^zend_extension/\;zend_extension/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
-
-RUN curl -sS https://getcomposer.org/installer | \
-  php -- --install-dir=/usr/local/bin --filename=composer
-
-RUN groupadd -g 1000 app \
- && useradd -g 1000 -u 1000 -d /var/www -s /bin/bash app
-
-RUN apt-get install -y gnupg \
-  && curl -sL https://deb.nodesource.com/setup_8.x | bash - \
-  && apt-get install -y nodejs \
-  && mkdir /var/www/.config /var/www/.npm \
-  && chown app:app /var/www/.config /var/www/.npm \
-  && ln -s /var/www/html/node_modules/grunt/bin/grunt /usr/bin/grunt
-
-RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/cron.php\n#\n' >> /etc/crontab
-
-COPY conf/www.conf /usr/local/etc/php-fpm.d/
-COPY conf/php.ini /usr/local/etc/php/
-COPY conf/php-fpm.conf /usr/local/etc/
-COPY bin/cronstart /usr/local/bin/
-
-RUN mkdir /sock
-RUN chown -R app:app /usr/local/etc/php/conf.d /sock
-
-USER app:app
-
-VOLUME /var/www
-
-WORKDIR /var/www/html
-
-EXPOSE 9001

+ 0 - 4
images/php/5.6/bin/cronstart

@@ -1,4 +0,0 @@
-#!/bin/bash
-service cron start
-
-/usr/bin/crontab

+ 0 - 31
images/php/5.6/conf/php-fpm.conf

@@ -1,31 +0,0 @@
-; This file was initially adapated from the output of: (on PHP 5.6)
-;   grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default
-
-[global]
-
-error_log = /proc/self/fd/2
-daemonize = no
-
-[www]
-
-; if we send this to /proc/self/fd/1, it never appears
-access.log = /proc/self/fd/2
-
-user = app
-group = app
-
-listen = /sock/docker.sock
-listen.owner = app
-listen.group = app
-listen.mode = 0660
-
-pm = dynamic
-pm.max_children = 10
-pm.start_servers = 4
-pm.min_spare_servers = 2
-pm.max_spare_servers = 6
-
-clear_env = no
-
-; Ensure worker stdout and stderr are sent to the main error log.
-catch_workers_output = yes

+ 0 - 13
images/php/5.6/conf/php.ini

@@ -1,13 +0,0 @@
-memory_limit = 2G
-max_execution_time = 1800
-zlib.output_compression = On
-cgi.fix_pathinfo = 0
-date.timezone = UTC
-
-xdebug.remote_autostart = 1
-xdebug.remote_enable = 1
-xdebug.remote_host = host.docker.internal
-xdebug.remote_port = 9001
-
-upload_max_filesize = 20M
-post_max_size = 20M

+ 0 - 413
images/php/5.6/conf/www.conf

@@ -1,413 +0,0 @@
-; Start a new pool named 'www'.
-; the variable $pool can we used in any directive and will be replaced by the
-; pool name ('www' here)
-[www]
-
-; Per pool prefix
-; It only applies on the following directives:
-; - 'access.log'
-; - 'slowlog'
-; - 'listen' (unixsocket)
-; - 'chroot'
-; - 'chdir'
-; - 'php_values'
-; - 'php_admin_values'
-; When not set, the global prefix (or NONE) applies instead.
-; Note: This directive can also be relative to the global prefix.
-; Default Value: none
-;prefix = /path/to/pools/$pool
-
-; Unix user/group of processes
-; Note: The user is mandatory. If the group is not set, the default user's group
-;       will be used.
-user = app
-group = app
-
-; The address on which to accept FastCGI requests.
-; Valid syntaxes are:
-;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on
-;                            a specific port;
-;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
-;                            a specific port;
-;   'port'                 - to listen on a TCP socket to all addresses
-;                            (IPv6 and IPv4-mapped) on a specific port;
-;   '/path/to/unix/socket' - to listen on a unix socket.
-; Note: This value is mandatory.
-listen = 127.0.0.1:9000
-
-; Set listen(2) backlog.
-; Default Value: 511 (-1 on FreeBSD and OpenBSD)
-;listen.backlog = 511
-
-; Set permissions for unix socket, if one is used. In Linux, read/write
-; permissions must be set in order to allow connections from a web server. Many
-; BSD-derived systems allow connections regardless of permissions.
-; Default Values: user and group are set as the running user
-;                 mode is set to 0660
-;listen.owner = www-data
-;listen.group = www-data
-;listen.mode = 0660
-; When POSIX Access Control Lists are supported you can set them using
-; these options, value is a comma separated list of user/group names.
-; When set, listen.owner and listen.group are ignored
-;listen.acl_users =
-;listen.acl_groups =
-
-; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
-; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
-; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
-; must be separated by a comma. If this value is left blank, connections will be
-; accepted from any ip address.
-; Default Value: any
-;listen.allowed_clients = 127.0.0.1
-
-; Specify the nice(2) priority to apply to the pool processes (only if set)
-; The value can vary from -19 (highest priority) to 20 (lower priority)
-; Note: - It will only work if the FPM master process is launched as root
-;       - The pool processes will inherit the master process priority
-;         unless it specified otherwise
-; Default Value: no set
-; process.priority = -19
-
-; Choose how the process manager will control the number of child processes.
-; Possible Values:
-;   static  - a fixed number (pm.max_children) of child processes;
-;   dynamic - the number of child processes are set dynamically based on the
-;             following directives. With this process management, there will be
-;             always at least 1 children.
-;             pm.max_children      - the maximum number of children that can
-;                                    be alive at the same time.
-;             pm.start_servers     - the number of children created on startup.
-;             pm.min_spare_servers - the minimum number of children in 'idle'
-;                                    state (waiting to process). If the number
-;                                    of 'idle' processes is less than this
-;                                    number then some children will be created.
-;             pm.max_spare_servers - the maximum number of children in 'idle'
-;                                    state (waiting to process). If the number
-;                                    of 'idle' processes is greater than this
-;                                    number then some children will be killed.
-;  ondemand - no children are created at startup. Children will be forked when
-;             new requests will connect. The following parameter are used:
-;             pm.max_children           - the maximum number of children that
-;                                         can be alive at the same time.
-;             pm.process_idle_timeout   - The number of seconds after which
-;                                         an idle process will be killed.
-; Note: This value is mandatory.
-pm = dynamic
-
-; The number of child processes to be created when pm is set to 'static' and the
-; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
-; This value sets the limit on the number of simultaneous requests that will be
-; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
-; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
-; CGI. The below defaults are based on a server without much resources. Don't
-; forget to tweak pm.* to fit your needs.
-; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
-; Note: This value is mandatory.
-pm.max_children = 5
-
-; The number of child processes created on startup.
-; Note: Used only when pm is set to 'dynamic'
-; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
-pm.start_servers = 2
-
-; The desired minimum number of idle server processes.
-; Note: Used only when pm is set to 'dynamic'
-; Note: Mandatory when pm is set to 'dynamic'
-pm.min_spare_servers = 1
-
-; The desired maximum number of idle server processes.
-; Note: Used only when pm is set to 'dynamic'
-; Note: Mandatory when pm is set to 'dynamic'
-pm.max_spare_servers = 3
-
-; The number of seconds after which an idle process will be killed.
-; Note: Used only when pm is set to 'ondemand'
-; Default Value: 10s
-;pm.process_idle_timeout = 10s;
-
-; The number of requests each child process should execute before respawning.
-; This can be useful to work around memory leaks in 3rd party libraries. For
-; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
-; Default Value: 0
-;pm.max_requests = 500
-
-; The URI to view the FPM status page. If this value is not set, no URI will be
-; recognized as a status page. It shows the following informations:
-;   pool                 - the name of the pool;
-;   process manager      - static, dynamic or ondemand;
-;   start time           - the date and time FPM has started;
-;   start since          - number of seconds since FPM has started;
-;   accepted conn        - the number of request accepted by the pool;
-;   listen queue         - the number of request in the queue of pending
-;                          connections (see backlog in listen(2));
-;   max listen queue     - the maximum number of requests in the queue
-;                          of pending connections since FPM has started;
-;   listen queue len     - the size of the socket queue of pending connections;
-;   idle processes       - the number of idle processes;
-;   active processes     - the number of active processes;
-;   total processes      - the number of idle + active processes;
-;   max active processes - the maximum number of active processes since FPM
-;                          has started;
-;   max children reached - number of times, the process limit has been reached,
-;                          when pm tries to start more children (works only for
-;                          pm 'dynamic' and 'ondemand');
-; Value are updated in real time.
-; Example output:
-;   pool:                 www
-;   process manager:      static
-;   start time:           01/Jul/2011:17:53:49 +0200
-;   start since:          62636
-;   accepted conn:        190460
-;   listen queue:         0
-;   max listen queue:     1
-;   listen queue len:     42
-;   idle processes:       4
-;   active processes:     11
-;   total processes:      15
-;   max active processes: 12
-;   max children reached: 0
-;
-; By default the status page output is formatted as text/plain. Passing either
-; 'html', 'xml' or 'json' in the query string will return the corresponding
-; output syntax. Example:
-;   http://www.foo.bar/status
-;   http://www.foo.bar/status?json
-;   http://www.foo.bar/status?html
-;   http://www.foo.bar/status?xml
-;
-; By default the status page only outputs short status. Passing 'full' in the
-; query string will also return status for each pool process.
-; Example:
-;   http://www.foo.bar/status?full
-;   http://www.foo.bar/status?json&full
-;   http://www.foo.bar/status?html&full
-;   http://www.foo.bar/status?xml&full
-; The Full status returns for each process:
-;   pid                  - the PID of the process;
-;   state                - the state of the process (Idle, Running, ...);
-;   start time           - the date and time the process has started;
-;   start since          - the number of seconds since the process has started;
-;   requests             - the number of requests the process has served;
-;   request duration     - the duration in µs of the requests;
-;   request method       - the request method (GET, POST, ...);
-;   request URI          - the request URI with the query string;
-;   content length       - the content length of the request (only with POST);
-;   user                 - the user (PHP_AUTH_USER) (or '-' if not set);
-;   script               - the main script called (or '-' if not set);
-;   last request cpu     - the %cpu the last request consumed
-;                          it's always 0 if the process is not in Idle state
-;                          because CPU calculation is done when the request
-;                          processing has terminated;
-;   last request memory  - the max amount of memory the last request consumed
-;                          it's always 0 if the process is not in Idle state
-;                          because memory calculation is done when the request
-;                          processing has terminated;
-; If the process is in Idle state, then informations are related to the
-; last request the process has served. Otherwise informations are related to
-; the current request being served.
-; Example output:
-;   ************************
-;   pid:                  31330
-;   state:                Running
-;   start time:           01/Jul/2011:17:53:49 +0200
-;   start since:          63087
-;   requests:             12808
-;   request duration:     1250261
-;   request method:       GET
-;   request URI:          /test_mem.php?N=10000
-;   content length:       0
-;   user:                 -
-;   script:               /home/fat/web/docs/php/test_mem.php
-;   last request cpu:     0.00
-;   last request memory:  0
-;
-; Note: There is a real-time FPM status monitoring sample web page available
-;       It's available in: /usr/local/share/php/fpm/status.html
-;
-; Note: The value must start with a leading slash (/). The value can be
-;       anything, but it may not be a good idea to use the .php extension or it
-;       may conflict with a real PHP file.
-; Default Value: not set
-;pm.status_path = /status
-
-; The ping URI to call the monitoring page of FPM. If this value is not set, no
-; URI will be recognized as a ping page. This could be used to test from outside
-; that FPM is alive and responding, or to
-; - create a graph of FPM availability (rrd or such);
-; - remove a server from a group if it is not responding (load balancing);
-; - trigger alerts for the operating team (24/7).
-; Note: The value must start with a leading slash (/). The value can be
-;       anything, but it may not be a good idea to use the .php extension or it
-;       may conflict with a real PHP file.
-; Default Value: not set
-;ping.path = /ping
-
-; This directive may be used to customize the response of a ping request. The
-; response is formatted as text/plain with a 200 response code.
-; Default Value: pong
-;ping.response = pong
-
-; The access log file
-; Default: not set
-;access.log = log/$pool.access.log
-
-; The access log format.
-; The following syntax is allowed
-;  %%: the '%' character
-;  %C: %CPU used by the request
-;      it can accept the following format:
-;      - %{user}C for user CPU only
-;      - %{system}C for system CPU only
-;      - %{total}C  for user + system CPU (default)
-;  %d: time taken to serve the request
-;      it can accept the following format:
-;      - %{seconds}d (default)
-;      - %{miliseconds}d
-;      - %{mili}d
-;      - %{microseconds}d
-;      - %{micro}d
-;  %e: an environment variable (same as $_ENV or $_SERVER)
-;      it must be associated with embraces to specify the name of the env
-;      variable. Some exemples:
-;      - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
-;      - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
-;  %f: script filename
-;  %l: content-length of the request (for POST request only)
-;  %m: request method
-;  %M: peak of memory allocated by PHP
-;      it can accept the following format:
-;      - %{bytes}M (default)
-;      - %{kilobytes}M
-;      - %{kilo}M
-;      - %{megabytes}M
-;      - %{mega}M
-;  %n: pool name
-;  %o: output header
-;      it must be associated with embraces to specify the name of the header:
-;      - %{Content-Type}o
-;      - %{X-Powered-By}o
-;      - %{Transfert-Encoding}o
-;      - ....
-;  %p: PID of the child that serviced the request
-;  %P: PID of the parent of the child that serviced the request
-;  %q: the query string
-;  %Q: the '?' character if query string exists
-;  %r: the request URI (without the query string, see %q and %Q)
-;  %R: remote IP address
-;  %s: status (response code)
-;  %t: server time the request was received
-;      it can accept a strftime(3) format:
-;      %d/%b/%Y:%H:%M:%S %z (default)
-;      The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
-;      e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
-;  %T: time the log has been written (the request has finished)
-;      it can accept a strftime(3) format:
-;      %d/%b/%Y:%H:%M:%S %z (default)
-;      The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
-;      e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
-;  %u: remote user
-;
-; Default: "%R - %u %t \"%m %r\" %s"
-;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
-
-; The log file for slow requests
-; Default Value: not set
-; Note: slowlog is mandatory if request_slowlog_timeout is set
-;slowlog = log/$pool.log.slow
-
-; The timeout for serving a single request after which a PHP backtrace will be
-; dumped to the 'slowlog' file. A value of '0s' means 'off'.
-; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
-; Default Value: 0
-;request_slowlog_timeout = 0
-
-; The timeout for serving a single request after which the worker process will
-; be killed. This option should be used when the 'max_execution_time' ini option
-; does not stop script execution for some reason. A value of '0' means 'off'.
-; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
-; Default Value: 0
-;request_terminate_timeout = 0
-
-; Set open file descriptor rlimit.
-; Default Value: system defined value
-;rlimit_files = 1024
-
-; Set max core size rlimit.
-; Possible Values: 'unlimited' or an integer greater or equal to 0
-; Default Value: system defined value
-;rlimit_core = 0
-
-; Chroot to this directory at the start. This value must be defined as an
-; absolute path. When this value is not set, chroot is not used.
-; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
-; of its subdirectories. If the pool prefix is not set, the global prefix
-; will be used instead.
-; Note: chrooting is a great security feature and should be used whenever
-;       possible. However, all PHP paths will be relative to the chroot
-;       (error_log, sessions.save_path, ...).
-; Default Value: not set
-;chroot =
-
-; Chdir to this directory at the start.
-; Note: relative path can be used.
-; Default Value: current directory or / when chroot
-;chdir = /var/www
-
-; Redirect worker stdout and stderr into main error log. If not set, stdout and
-; stderr will be redirected to /dev/null according to FastCGI specs.
-; Note: on highloaded environement, this can cause some delay in the page
-; process time (several ms).
-; Default Value: no
-;catch_workers_output = yes
-
-; Clear environment in FPM workers
-; Prevents arbitrary environment variables from reaching FPM worker processes
-; by clearing the environment in workers before env vars specified in this
-; pool configuration are added.
-; Setting to "no" will make all environment variables available to PHP code
-; via getenv(), $_ENV and $_SERVER.
-; Default Value: yes
-;clear_env = no
-
-; Limits the extensions of the main script FPM will allow to parse. This can
-; prevent configuration mistakes on the web server side. You should only limit
-; FPM to .php extensions to prevent malicious users to use other extensions to
-; exectute php code.
-; Note: set an empty value to allow all extensions.
-; Default Value: .php
-;security.limit_extensions = .php .php3 .php4 .php5 .php7
-
-; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
-; the current environment.
-; Default Value: clean env
-;env[HOSTNAME] = $HOSTNAME
-;env[PATH] = /usr/local/bin:/usr/bin:/bin
-;env[TMP] = /tmp
-;env[TMPDIR] = /tmp
-;env[TEMP] = /tmp
-
-; Additional php.ini defines, specific to this pool of workers. These settings
-; overwrite the values previously defined in the php.ini. The directives are the
-; same as the PHP SAPI:
-;   php_value/php_flag             - you can set classic ini defines which can
-;                                    be overwritten from PHP call 'ini_set'.
-;   php_admin_value/php_admin_flag - these directives won't be overwritten by
-;                                     PHP call 'ini_set'
-; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
-
-; Defining 'extension' will load the corresponding shared extension from
-; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
-; overwrite previously defined php.ini values, but will append the new value
-; instead.
-
-; Note: path INI options can be relative and will be expanded with the prefix
-; (pool, global or /usr/local)
-
-; Default Value: nothing is defined by default except the values in php.ini and
-;                specified at startup with the -d argument
-;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
-;php_flag[display_errors] = off
-;php_admin_value[error_log] = /var/log/fpm-php.www.log
-;php_admin_flag[log_errors] = on
-;php_admin_value[memory_limit] = 32M

+ 0 - 74
images/php/7.0/Dockerfile

@@ -1,74 +0,0 @@
-FROM php:7.0-fpm
-MAINTAINER Mark Shust <mark@shust.com>
-
-RUN apt-get update && apt-get install -y \
-  cron \
-  git \
-  gzip \
-  libfreetype6-dev \
-  libicu-dev \
-  libjpeg62-turbo-dev \
-  libmcrypt-dev \
-  libpng-dev \
-  libxslt1-dev \
-  lsof \
-  mysql-client \
-  vim \
-  zip
-
-RUN docker-php-ext-configure \
-  gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
-
-RUN docker-php-ext-install \
-  bcmath \
-  gd \
-  intl \
-  mbstring \
-  mcrypt \
-  opcache \
-  pdo_mysql \
-  soap \
-  xsl \
-  zip
-
-RUN pecl channel-update pecl.php.net \
-  && pecl install xdebug \
-  && docker-php-ext-enable xdebug \
-  && sed -i -e 's/^zend_extension/\;zend_extension/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
-
-RUN apt-get install -y libssh2-1-dev \
-  && pecl install ssh2-1.1.2 \
-  && docker-php-ext-enable ssh2
-
-RUN curl -sS https://getcomposer.org/installer | \
-  php -- --install-dir=/usr/local/bin --filename=composer
-
-RUN groupadd -g 1000 app \
- && useradd -g 1000 -u 1000 -d /var/www -s /bin/bash app
-
-RUN apt-get install -y gnupg \
-  && curl -sL https://deb.nodesource.com/setup_8.x | bash - \
-  && apt-get install -y nodejs \
-  && mkdir /var/www/.config /var/www/.npm \
-  && chown app:app /var/www/.config /var/www/.npm \
-  && ln -s /var/www/html/node_modules/grunt/bin/grunt /usr/bin/grunt
-
-RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/update/cron.php\n' >> /etc/crontab
-RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento cron:run\n' >> /etc/crontab
-RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento setup:cron:run\n#\n' >> /etc/crontab
-
-COPY conf/www.conf /usr/local/etc/php-fpm.d/
-COPY conf/php.ini /usr/local/etc/php/
-COPY conf/php-fpm.conf /usr/local/etc/
-COPY bin/cronstart /usr/local/bin/
-
-RUN mkdir /sock
-RUN chown -R app:app /usr/local/etc/php/conf.d /sock
-
-USER app:app
-
-VOLUME /var/www
-
-WORKDIR /var/www/html
-
-EXPOSE 9001

+ 0 - 7
images/php/7.0/bin/cronstart

@@ -1,7 +0,0 @@
-#!/bin/bash
-service cron start
-
-touch /var/www/html/var/.setup_cronjob_status /var/www/html/var/.update_cronjob_status
-chown app:app /var/www/html/var/.setup_cronjob_status /var/www/html/var/.update_cronjob_status
-
-/usr/bin/crontab

+ 0 - 31
images/php/7.0/conf/php-fpm.conf

@@ -1,31 +0,0 @@
-; This file was initially adapated from the output of: (on PHP 5.6)
-;   grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default
-
-[global]
-
-error_log = /proc/self/fd/2
-daemonize = no
-
-[www]
-
-; if we send this to /proc/self/fd/1, it never appears
-access.log = /proc/self/fd/2
-
-user = app
-group = app
-
-listen = /sock/docker.sock
-listen.owner = app
-listen.group = app
-listen.mode = 0660
-
-pm = dynamic
-pm.max_children = 10
-pm.start_servers = 4
-pm.min_spare_servers = 2
-pm.max_spare_servers = 6
-
-clear_env = no
-
-; Ensure worker stdout and stderr are sent to the main error log.
-catch_workers_output = yes

+ 0 - 13
images/php/7.0/conf/php.ini

@@ -1,13 +0,0 @@
-memory_limit = 2G
-max_execution_time = 1800
-zlib.output_compression = On
-cgi.fix_pathinfo = 0
-date.timezone = UTC
-
-xdebug.remote_autostart = 1
-xdebug.remote_enable = 1
-xdebug.remote_host = host.docker.internal
-xdebug.remote_port = 9001
-
-upload_max_filesize = 20M
-post_max_size = 20M

+ 0 - 413
images/php/7.0/conf/www.conf

@@ -1,413 +0,0 @@
-; Start a new pool named 'www'.
-; the variable $pool can we used in any directive and will be replaced by the
-; pool name ('www' here)
-[www]
-
-; Per pool prefix
-; It only applies on the following directives:
-; - 'access.log'
-; - 'slowlog'
-; - 'listen' (unixsocket)
-; - 'chroot'
-; - 'chdir'
-; - 'php_values'
-; - 'php_admin_values'
-; When not set, the global prefix (or NONE) applies instead.
-; Note: This directive can also be relative to the global prefix.
-; Default Value: none
-;prefix = /path/to/pools/$pool
-
-; Unix user/group of processes
-; Note: The user is mandatory. If the group is not set, the default user's group
-;       will be used.
-user = app
-group = app
-
-; The address on which to accept FastCGI requests.
-; Valid syntaxes are:
-;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on
-;                            a specific port;
-;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
-;                            a specific port;
-;   'port'                 - to listen on a TCP socket to all addresses
-;                            (IPv6 and IPv4-mapped) on a specific port;
-;   '/path/to/unix/socket' - to listen on a unix socket.
-; Note: This value is mandatory.
-listen = 127.0.0.1:9000
-
-; Set listen(2) backlog.
-; Default Value: 511 (-1 on FreeBSD and OpenBSD)
-;listen.backlog = 511
-
-; Set permissions for unix socket, if one is used. In Linux, read/write
-; permissions must be set in order to allow connections from a web server. Many
-; BSD-derived systems allow connections regardless of permissions.
-; Default Values: user and group are set as the running user
-;                 mode is set to 0660
-;listen.owner = www-data
-;listen.group = www-data
-;listen.mode = 0660
-; When POSIX Access Control Lists are supported you can set them using
-; these options, value is a comma separated list of user/group names.
-; When set, listen.owner and listen.group are ignored
-;listen.acl_users =
-;listen.acl_groups =
-
-; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
-; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
-; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
-; must be separated by a comma. If this value is left blank, connections will be
-; accepted from any ip address.
-; Default Value: any
-;listen.allowed_clients = 127.0.0.1
-
-; Specify the nice(2) priority to apply to the pool processes (only if set)
-; The value can vary from -19 (highest priority) to 20 (lower priority)
-; Note: - It will only work if the FPM master process is launched as root
-;       - The pool processes will inherit the master process priority
-;         unless it specified otherwise
-; Default Value: no set
-; process.priority = -19
-
-; Choose how the process manager will control the number of child processes.
-; Possible Values:
-;   static  - a fixed number (pm.max_children) of child processes;
-;   dynamic - the number of child processes are set dynamically based on the
-;             following directives. With this process management, there will be
-;             always at least 1 children.
-;             pm.max_children      - the maximum number of children that can
-;                                    be alive at the same time.
-;             pm.start_servers     - the number of children created on startup.
-;             pm.min_spare_servers - the minimum number of children in 'idle'
-;                                    state (waiting to process). If the number
-;                                    of 'idle' processes is less than this
-;                                    number then some children will be created.
-;             pm.max_spare_servers - the maximum number of children in 'idle'
-;                                    state (waiting to process). If the number
-;                                    of 'idle' processes is greater than this
-;                                    number then some children will be killed.
-;  ondemand - no children are created at startup. Children will be forked when
-;             new requests will connect. The following parameter are used:
-;             pm.max_children           - the maximum number of children that
-;                                         can be alive at the same time.
-;             pm.process_idle_timeout   - The number of seconds after which
-;                                         an idle process will be killed.
-; Note: This value is mandatory.
-pm = dynamic
-
-; The number of child processes to be created when pm is set to 'static' and the
-; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
-; This value sets the limit on the number of simultaneous requests that will be
-; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
-; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
-; CGI. The below defaults are based on a server without much resources. Don't
-; forget to tweak pm.* to fit your needs.
-; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
-; Note: This value is mandatory.
-pm.max_children = 5
-
-; The number of child processes created on startup.
-; Note: Used only when pm is set to 'dynamic'
-; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
-pm.start_servers = 2
-
-; The desired minimum number of idle server processes.
-; Note: Used only when pm is set to 'dynamic'
-; Note: Mandatory when pm is set to 'dynamic'
-pm.min_spare_servers = 1
-
-; The desired maximum number of idle server processes.
-; Note: Used only when pm is set to 'dynamic'
-; Note: Mandatory when pm is set to 'dynamic'
-pm.max_spare_servers = 3
-
-; The number of seconds after which an idle process will be killed.
-; Note: Used only when pm is set to 'ondemand'
-; Default Value: 10s
-;pm.process_idle_timeout = 10s;
-
-; The number of requests each child process should execute before respawning.
-; This can be useful to work around memory leaks in 3rd party libraries. For
-; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
-; Default Value: 0
-;pm.max_requests = 500
-
-; The URI to view the FPM status page. If this value is not set, no URI will be
-; recognized as a status page. It shows the following informations:
-;   pool                 - the name of the pool;
-;   process manager      - static, dynamic or ondemand;
-;   start time           - the date and time FPM has started;
-;   start since          - number of seconds since FPM has started;
-;   accepted conn        - the number of request accepted by the pool;
-;   listen queue         - the number of request in the queue of pending
-;                          connections (see backlog in listen(2));
-;   max listen queue     - the maximum number of requests in the queue
-;                          of pending connections since FPM has started;
-;   listen queue len     - the size of the socket queue of pending connections;
-;   idle processes       - the number of idle processes;
-;   active processes     - the number of active processes;
-;   total processes      - the number of idle + active processes;
-;   max active processes - the maximum number of active processes since FPM
-;                          has started;
-;   max children reached - number of times, the process limit has been reached,
-;                          when pm tries to start more children (works only for
-;                          pm 'dynamic' and 'ondemand');
-; Value are updated in real time.
-; Example output:
-;   pool:                 www
-;   process manager:      static
-;   start time:           01/Jul/2011:17:53:49 +0200
-;   start since:          62636
-;   accepted conn:        190460
-;   listen queue:         0
-;   max listen queue:     1
-;   listen queue len:     42
-;   idle processes:       4
-;   active processes:     11
-;   total processes:      15
-;   max active processes: 12
-;   max children reached: 0
-;
-; By default the status page output is formatted as text/plain. Passing either
-; 'html', 'xml' or 'json' in the query string will return the corresponding
-; output syntax. Example:
-;   http://www.foo.bar/status
-;   http://www.foo.bar/status?json
-;   http://www.foo.bar/status?html
-;   http://www.foo.bar/status?xml
-;
-; By default the status page only outputs short status. Passing 'full' in the
-; query string will also return status for each pool process.
-; Example:
-;   http://www.foo.bar/status?full
-;   http://www.foo.bar/status?json&full
-;   http://www.foo.bar/status?html&full
-;   http://www.foo.bar/status?xml&full
-; The Full status returns for each process:
-;   pid                  - the PID of the process;
-;   state                - the state of the process (Idle, Running, ...);
-;   start time           - the date and time the process has started;
-;   start since          - the number of seconds since the process has started;
-;   requests             - the number of requests the process has served;
-;   request duration     - the duration in µs of the requests;
-;   request method       - the request method (GET, POST, ...);
-;   request URI          - the request URI with the query string;
-;   content length       - the content length of the request (only with POST);
-;   user                 - the user (PHP_AUTH_USER) (or '-' if not set);
-;   script               - the main script called (or '-' if not set);
-;   last request cpu     - the %cpu the last request consumed
-;                          it's always 0 if the process is not in Idle state
-;                          because CPU calculation is done when the request
-;                          processing has terminated;
-;   last request memory  - the max amount of memory the last request consumed
-;                          it's always 0 if the process is not in Idle state
-;                          because memory calculation is done when the request
-;                          processing has terminated;
-; If the process is in Idle state, then informations are related to the
-; last request the process has served. Otherwise informations are related to
-; the current request being served.
-; Example output:
-;   ************************
-;   pid:                  31330
-;   state:                Running
-;   start time:           01/Jul/2011:17:53:49 +0200
-;   start since:          63087
-;   requests:             12808
-;   request duration:     1250261
-;   request method:       GET
-;   request URI:          /test_mem.php?N=10000
-;   content length:       0
-;   user:                 -
-;   script:               /home/fat/web/docs/php/test_mem.php
-;   last request cpu:     0.00
-;   last request memory:  0
-;
-; Note: There is a real-time FPM status monitoring sample web page available
-;       It's available in: /usr/local/share/php/fpm/status.html
-;
-; Note: The value must start with a leading slash (/). The value can be
-;       anything, but it may not be a good idea to use the .php extension or it
-;       may conflict with a real PHP file.
-; Default Value: not set
-;pm.status_path = /status
-
-; The ping URI to call the monitoring page of FPM. If this value is not set, no
-; URI will be recognized as a ping page. This could be used to test from outside
-; that FPM is alive and responding, or to
-; - create a graph of FPM availability (rrd or such);
-; - remove a server from a group if it is not responding (load balancing);
-; - trigger alerts for the operating team (24/7).
-; Note: The value must start with a leading slash (/). The value can be
-;       anything, but it may not be a good idea to use the .php extension or it
-;       may conflict with a real PHP file.
-; Default Value: not set
-;ping.path = /ping
-
-; This directive may be used to customize the response of a ping request. The
-; response is formatted as text/plain with a 200 response code.
-; Default Value: pong
-;ping.response = pong
-
-; The access log file
-; Default: not set
-;access.log = log/$pool.access.log
-
-; The access log format.
-; The following syntax is allowed
-;  %%: the '%' character
-;  %C: %CPU used by the request
-;      it can accept the following format:
-;      - %{user}C for user CPU only
-;      - %{system}C for system CPU only
-;      - %{total}C  for user + system CPU (default)
-;  %d: time taken to serve the request
-;      it can accept the following format:
-;      - %{seconds}d (default)
-;      - %{miliseconds}d
-;      - %{mili}d
-;      - %{microseconds}d
-;      - %{micro}d
-;  %e: an environment variable (same as $_ENV or $_SERVER)
-;      it must be associated with embraces to specify the name of the env
-;      variable. Some exemples:
-;      - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
-;      - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
-;  %f: script filename
-;  %l: content-length of the request (for POST request only)
-;  %m: request method
-;  %M: peak of memory allocated by PHP
-;      it can accept the following format:
-;      - %{bytes}M (default)
-;      - %{kilobytes}M
-;      - %{kilo}M
-;      - %{megabytes}M
-;      - %{mega}M
-;  %n: pool name
-;  %o: output header
-;      it must be associated with embraces to specify the name of the header:
-;      - %{Content-Type}o
-;      - %{X-Powered-By}o
-;      - %{Transfert-Encoding}o
-;      - ....
-;  %p: PID of the child that serviced the request
-;  %P: PID of the parent of the child that serviced the request
-;  %q: the query string
-;  %Q: the '?' character if query string exists
-;  %r: the request URI (without the query string, see %q and %Q)
-;  %R: remote IP address
-;  %s: status (response code)
-;  %t: server time the request was received
-;      it can accept a strftime(3) format:
-;      %d/%b/%Y:%H:%M:%S %z (default)
-;      The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
-;      e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
-;  %T: time the log has been written (the request has finished)
-;      it can accept a strftime(3) format:
-;      %d/%b/%Y:%H:%M:%S %z (default)
-;      The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
-;      e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
-;  %u: remote user
-;
-; Default: "%R - %u %t \"%m %r\" %s"
-;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
-
-; The log file for slow requests
-; Default Value: not set
-; Note: slowlog is mandatory if request_slowlog_timeout is set
-;slowlog = log/$pool.log.slow
-
-; The timeout for serving a single request after which a PHP backtrace will be
-; dumped to the 'slowlog' file. A value of '0s' means 'off'.
-; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
-; Default Value: 0
-;request_slowlog_timeout = 0
-
-; The timeout for serving a single request after which the worker process will
-; be killed. This option should be used when the 'max_execution_time' ini option
-; does not stop script execution for some reason. A value of '0' means 'off'.
-; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
-; Default Value: 0
-;request_terminate_timeout = 0
-
-; Set open file descriptor rlimit.
-; Default Value: system defined value
-;rlimit_files = 1024
-
-; Set max core size rlimit.
-; Possible Values: 'unlimited' or an integer greater or equal to 0
-; Default Value: system defined value
-;rlimit_core = 0
-
-; Chroot to this directory at the start. This value must be defined as an
-; absolute path. When this value is not set, chroot is not used.
-; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
-; of its subdirectories. If the pool prefix is not set, the global prefix
-; will be used instead.
-; Note: chrooting is a great security feature and should be used whenever
-;       possible. However, all PHP paths will be relative to the chroot
-;       (error_log, sessions.save_path, ...).
-; Default Value: not set
-;chroot =
-
-; Chdir to this directory at the start.
-; Note: relative path can be used.
-; Default Value: current directory or / when chroot
-;chdir = /var/www
-
-; Redirect worker stdout and stderr into main error log. If not set, stdout and
-; stderr will be redirected to /dev/null according to FastCGI specs.
-; Note: on highloaded environement, this can cause some delay in the page
-; process time (several ms).
-; Default Value: no
-;catch_workers_output = yes
-
-; Clear environment in FPM workers
-; Prevents arbitrary environment variables from reaching FPM worker processes
-; by clearing the environment in workers before env vars specified in this
-; pool configuration are added.
-; Setting to "no" will make all environment variables available to PHP code
-; via getenv(), $_ENV and $_SERVER.
-; Default Value: yes
-;clear_env = no
-
-; Limits the extensions of the main script FPM will allow to parse. This can
-; prevent configuration mistakes on the web server side. You should only limit
-; FPM to .php extensions to prevent malicious users to use other extensions to
-; exectute php code.
-; Note: set an empty value to allow all extensions.
-; Default Value: .php
-;security.limit_extensions = .php .php3 .php4 .php5 .php7
-
-; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
-; the current environment.
-; Default Value: clean env
-;env[HOSTNAME] = $HOSTNAME
-;env[PATH] = /usr/local/bin:/usr/bin:/bin
-;env[TMP] = /tmp
-;env[TMPDIR] = /tmp
-;env[TEMP] = /tmp
-
-; Additional php.ini defines, specific to this pool of workers. These settings
-; overwrite the values previously defined in the php.ini. The directives are the
-; same as the PHP SAPI:
-;   php_value/php_flag             - you can set classic ini defines which can
-;                                    be overwritten from PHP call 'ini_set'.
-;   php_admin_value/php_admin_flag - these directives won't be overwritten by
-;                                     PHP call 'ini_set'
-; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
-
-; Defining 'extension' will load the corresponding shared extension from
-; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
-; overwrite previously defined php.ini values, but will append the new value
-; instead.
-
-; Note: path INI options can be relative and will be expanded with the prefix
-; (pool, global or /usr/local)
-
-; Default Value: nothing is defined by default except the values in php.ini and
-;                specified at startup with the -d argument
-;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
-;php_flag[display_errors] = off
-;php_admin_value[error_log] = /var/log/fpm-php.www.log
-;php_admin_flag[log_errors] = on
-;php_admin_value[memory_limit] = 32M

+ 0 - 1
lib/onelinesetup

@@ -5,5 +5,4 @@ VERSION=${2:-2.3.0}
 curl -s https://raw.githubusercontent.com/markoshust/docker-magento/master/lib/template|bash -s - magento-2
 bin/download $VERSION
 echo "127.0.0.1 $DOMAIN" | sudo tee -a /etc/hosts
-bin/start
 bin/setup $DOMAIN