在 webdevops/php-nginx:centos-7 的基础上增加了mongo,imagick,yar扩展
# https://docs.docker.com/compose/compose-file/
version: "3.2"
services:
# Web服务: nginx + php
php72:
image: exidakeng/php72:latest
container_name: lnmp_php72
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./data/wwwroot:/data/wwwroot:rw
- ./data/wwwlogs:/data/wwwlogs:rw
- ./nginx/conf.d:/opt/docker/etc/nginx/conf.d:ro
- ./php/php.ini:/opt/docker/etc/php/php.ini:ro
- ./php/php-fpm.conf:/etc/php-fpm.d/php-fpm.conf:ro
- ./logs/php-fpm:/var/log/php-fpm:rw
- ./logs/nginx:/var/log/nginx:rw
env_file:
- ./env/web.env
upstream php {
server 127.0.0.1:9000;
}
client_max_body_size 50m;
server {
listen 80;
server_name demo.com;
root /data/wwwroot/demo;
add_header Access-Control-Allow-Origin *;
index index.php index.html index.htm;
location ~ \.php$ {
fastcgi_pass php;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
# [web 相关环境变量设置]
#Environment variable Description Default
#WEB_DOCUMENT_ROOT Document root for webserver /app
#WEB_DOCUMENT_INDEX Index document index.php
#WEB_ALIAS_DOMAIN Domain aliases *.vm
#WEB_PHP_SOCKET PHP-FPM socket address 127.0.0.1:9000 (for php-* images)
#SERVICE_PHPFPM_OPTS PHP-FPM command arguments empty (when php fpm is used)
#SERVICE_APACHE_OPTS Apache command arguments empty (when apache is used)
#SERVICE_NGINX_OPTS Nginx command arguments empty (when nginx is used)
WEB_DOCUMENT_ROOT=/data/wwwroot
# [php.ini 环境变量设置]
### You can specify eg. php.memory_limit=256M as dynamic env variable which will set memory_limit = 256M as php setting.
#Environment variable Description Default
#php.{setting-key} Sets the {setting-key} as php setting
#PHP_DATE_TIMEZONE date.timezone UTC
#PHP_DISPLAY_ERRORS display_errors 0
#PHP_MEMORY_LIMIT memory_limit 512M
#PHP_MAX_EXECUTION_TIME max_execution_time 300
#PHP_POST_MAX_SIZE post_max_size 50M
#PHP_UPLOAD_MAX_FILESIZE upload_max_filesize 50M
#PHP_OPCACHE_MEMORY_CONSUMPTION opcache.memory_consumption 256
#PHP_OPCACHE_MAX_ACCELERATED_FILES opcache.max_accelerated_files 7963
#PHP_OPCACHE_VALIDATE_TIMESTAMPS opcache.validate_timestamps default
#PHP_OPCACHE_REVALIDATE_FREQ opcache.revalidate_freq default
#PHP_OPCACHE_INTERNED_STRINGS_BUFFER opcache.interned_strings_buffer 16
# [PHP FPM 环境变量设置]
### You can specify eg. fpm.pool.pm.max_requests=1000 as dyanmic env variable which will sets pm.max_requests = 1000 as fpm pool setting.
### The prefix fpm.pool is for pool settings and fpm.global for global master process settings.
#fpm.global.{setting-key} Sets the {setting-key} as fpm global setting for the master process
#fpm.pool.{setting-key} Sets the {setting-key} as fpm pool setting
#FPM_PROCESS_MAX process.max
#FPM_PM_MAX_CHILDREN pm.max_children
#FPM_PM_START_SERVERS pm.start_servers
#FPM_PM_MIN_SPARE_SERVERS pm.min_spare_servers
#FPM_PM_MAX_SPARE_SERVERS pm.max_spare_servers
#FPM_PROCESS_IDLE_TIMEOUT pm.process_idle_timeout
#FPM_MAX_REQUESTS pm.max_requests
#FPM_REQUEST_TERMINATE_TIMEOUT request_terminate_timeout
#FPM_RLIMIT_FILES rlimit_files
#FPM_RLIMIT_CORE rlimit_core
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; 自定义 php-fpm 设置
[global]
[www]
catch_workers_output=yes
; php.ini for custom settings
display_errors = On
error_reporting = E_ALL & ~E_NOTICE
; 要额外开启的扩展
; extension = imagick.so
[PHP Modules]
apc
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
igbinary
imagick
intl
json
ldap
libxml
mbstring
mcrypt
memcache
memcached
mhash
mongo
msgpack
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
yar
zip
zlib
[Zend Modules]
Content type
Image
Digest
Size
340.8 MB
Last updated
almost 8 years ago
docker pull exidakeng/pop_dev_php54