#!/bin/sh # Set the PHP-FPM listen port from the environment variable or default to 9000 export FPM_VIRTUAL_PORT=${FPM_VIRTUAL_PORT:-9000} # Substitute environment variables in the PHP-FPM configuration template envsubst '$FPM_VIRTUAL_PORT' < /usr/local/etc/php-fpm.d/zz-docker.conf.template > /usr/local/etc/php-fpm.d/zz-docker.conf # Start PHP-FPM php-fpm