Reputation: 1576
I'm trying to change this value in fpm configuration of PHP.
Here, you can see my simple docker-compose
file:
version: '3.6'
services:
wordpress:
image: wordpress:${WORDPRESS_VERSION:-php7.3-fpm}
container_name: ${WORDPRESS_CONTAINER:-wordpress}
volumes:
- ./php/pool.d:/usr/local/etc/php-fpm.d
environment:
- WORDPRESS_DB_NAME=${WORDPRESS_DB_NAME:-wordpress}
- WORDPRESS_TABLE_PREFIX=${WORDPRESS_TABLE_PREFIX:-wp_}
- WORDPRESS_DB_HOST=${WORDPRESS_DB_HOST:-mysql}
- WORDPRESS_DB_USER=${WORDPRESS_DB_USER:-root}
- WORDPRESS_DB_PASSWORD=${WORDPRESS_DB_PASSWORD:-password}
depends_on:
- mysql
restart: always
...
Inside ./php/pool.d/my-www.conf
I have only:
pm = static
pm.max_children = 10
And I get the error:
ERROR: [/usr/local/etc/php-fpm.d/my-www.conf:2] unknown entry 'pm'
If I include the www
pool namespace:
[www]
pm = static
pm.max_children = 10
And I get the error:
ALERT: [pool www] user has not been defined
Any ideas?
Upvotes: 2
Views: 5437
Reputation: 121
actually, when you mount a directory to the inside of the docker-image (like something you did ./php/pool.d:/usr/local/etc/php-fpm.d)
version: '3.6'
services:
wordpress:
...
volumes:
- ./php/pool.d:/usr/local/etc/php-fpm.d
...
you replaced it. thus, you have no configuration of the pool except a little part of it that is something like this
pm = static
pm.max_children = 10
therefore, you get the errors. to solve this trouble I can propose two ways:
version: '3.6'
services:
wordpress:
...
volumes:
- ./php/pool.d:/usr/local/etc/php-fpm.d
...
to this
version: '3.6'
services:
wordpress:
...
volumes:
- ./php/pool.d/www.conf:/usr/local/etc/php-fpm.d/www.conf
...
version: '3.6'
services:
wordpress:
...
volumes:
- ./php/pool.d/www2.conf:/usr/local/etc/php-fpm.d/www2.conf
...
Upvotes: 4