Sign inSign up

davyinsa/docker-nginx-php

By davyinsa

•Updated 3 days ago

Image
0

100K+

davyinsa/docker-nginx-php repository overview

⁠Overview

Build nginx+php-fpm in one docker image, with predifined nginx config for Drupal, Laravel etc.

⁠Usage
### 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
⁠docker-compose example

see docker-compose.yml⁠

⁠environment
⁠General
NameDescription
APPthe type of app, current allowed value: drupal, laravel
DRUPAL8_WEB_DIRfor drupal project that initialized via compose, the code is located in "web". using this flag to indicate.
MAX_FILE_UPLOAD_SIZEModify the upload file size, this will change both the nginx & php config. default value: 32M
⁠php & php-fpm
NameDesciption
PHP_MEM_LIMITThe php memory limit in php.ini. default value is 128M.
PHP_FPM_PMmodify the php-fpm processing type, allowed values: static, ondemand, dynamic
PHP_FPM_PM_MAX_CHILDRENmodify the pm.max_children for php-fpm config.
PHP_FPM_PM_PROCESS_IDLE_TIMEOUTmodify the pm.process_idle_timeout. this is availiable when pm = ondemand
PHP_FPM_PM_START_SERVERSmodify the pm.start_servers. this is availiable when pm = dynamic
PHP_FPM_PM_MIN_SPARE_SERVERSmodify the pm.min_spare_servers. this is availiable when pm = dynamic
PHP_FPM_PM_MAX_SPARE_SERVERSmodify the pm.max_spare_servers. this is availiable when pm = dynamic
PHP_FPM_STATUS_ENABLEenable the fpm status path or not. the path is /status
TIMEOUTmodify the nginx.conf:proxy_read_timeout and php.ini:max_execution_time

Tag summary

Content type

Image

Digest

sha256:f28e7b87c…

Size

122.8 MB

Last updated

3 days ago

docker pull davyinsa/docker-nginx-php:beta-8.3-fpm-nginx-alpine3.23