Build nginx+php-fpm in one docker image, with predifined nginx config for Drupal, Laravel etc.
### quick drupal running.
docker run -d -p 8080:80 -v /path-to-your-drupal-code:/var/www/html -e APP=drupal sparkpos/docker-nginx-php:7.1-alpine
### quick drupal running.
docker run -d -p 8080:80 -v /path-to-your-drupal-code:/var/www/html -e APP=drupal -e DRUPAL8_WEB_DIR=true sparkpos/docker-nginx-php:7.1-alpine
### quick laravel running.
docker run -d -p 8080:80 -v /path-to-your-laravel-code:/var/www/html -e APP=laravel sparkpos/docker-nginx-php:7.1-alpine
Name | Description |
---|---|
APP | the type of app, current allowed value: drupal, laravel |
DRUPAL8_WEB_DIR | for drupal project that initialized via compose, the code is located in "web". using this flag to indicate. |
MAX_FILE_UPLOAD_SIZE | Modify the upload file size, this will change both the nginx & php config. default value: 32M |
Name | Desciption |
---|---|
PHP_MEM_LIMIT | The php memory limit in php.ini. default value is 128M. |
PHP_FPM_PM | modify the php-fpm processing type, allowed values: static, ondemand, dynamic |
PHP_FPM_PM_MAX_CHILDREN | modify the pm.max_children for php-fpm config. |
PHP_FPM_PM_PROCESS_IDLE_TIMEOUT | modify the pm.process_idle_timeout. this is availiable when pm = ondemand |
PHP_FPM_PM_START_SERVERS | modify the pm.start_servers. this is availiable when pm = dynamic |
PHP_FPM_PM_MIN_SPARE_SERVERS | modify the pm.min_spare_servers. this is availiable when pm = dynamic |
PHP_FPM_PM_MAX_SPARE_SERVERS | modify the pm.max_spare_servers. this is availiable when pm = dynamic |
PHP_FPM_STATUS_ENABLE | enable the fpm status path or not. the path is /status |