Sign inSign up

cristiroma/nginx-php-fpm

By cristiroma

•Updated 22 days ago

NGINX / PHP-FPM / supercronic to run Drupal projects

Image
0

5.2K

cristiroma/nginx-php-fpm repository overview

⁠docker-nginx-php-fpm

Docker image with NGINX and PHP-FPM using supervisord

This image is ready to run applications PHP-FPM applications such as Drupal.

Extensions: bz2, gd, gettext, imap, intl, ldap, mysqli, opcache, pdo_mysql, sockets, xmlrpc, zip

⁠Build & run locally

# ./build.sh
# docker run -it --rm --name php73 -e php_memory_limit=2048M cristiroma/nginx-php-fpm:php73

⁠Running tests locally before commit

docker-compose -f docker-compose.test.yml up

⁠Using the image

⁠docker-compose.yml example

See docker-compose.test.yml

⁠Installing a CRON job

When starting, the image looks into environment for variable CRON_SCHEDULE_COMMAND and installs the job into /etc/crontabs/root. Example:

CRON_SCHEDULE_COMMAND="* * * * * cd /usr/share/nginx/html && sudo -E -u www-data ./vendor/bin/drush core:cron --uri=${DRUPAL_URL}"
CRON_SCHEDULE_COMMAND1="*/30 * * * * cd /usr/share/nginx/html && sudo -E -u www-data ./vendor/bin/drush core:cron --uri=${DRUPAL_URL}"
CRON_SCHEDULE_COMMAND2="* * * * * cd /usr/share/nginx/html && sudo -E -u www-data ./vendor/bin/drush core:cron --uri=${DRUPAL_URL}"

Tag summary

Content type

Image

Digest

sha256:9699a05cf…

Size

349.2 MB

Last updated

22 days ago

docker pull cristiroma/nginx-php-fpm:php83