Skip to content

mimosu/docker-php-fpm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP FPM (FastCGI Process Manager)

Project root directory should be mapped to /var/www/app inside the container.

Extensions

Installed PHP extensions:

  • gd
  • ldap
  • mongodb
  • xdebug
  • mcrypt
  • redis
  • memcached
  • bcmath
  • bz2
  • calendar
  • iconv
  • mbstring
  • mysqli
  • pdo_mysql
  • pdo_pgsql
  • pgsql
  • opcache
  • intl
  • soap
  • exif
  • zip
  • pcntl

Xdebug

The default configuration file for Xdebug is similar to:

zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_connect_back=0
xdebug.idekey=docker
xdebug.remote_host=

Xdebug can be configured through some environment variables:

  • XDEBUG_HOST
  • XDEBUG_PORT (default to 9000)
  • XDEBUG_IDE_KEY (default to docker)

For example, if you're using Docker Compose, we can define the service as follow:

php-fpm:
    image: trieuducthai/laravel-php-fpm
    restart: always
    volumes:
      - ${PROJECT_ROOT}:/var/www/app
    expose:
      - "9000"
    environment:
      XDEBUG_HOST: ${XDEBUG_HOST}
      XDEBUG_PORT: ${XDEBUG_PORT:-9000}
      XDEBUG_IDE_KEY: ${XDEBUG_IDE_KEY:-docker}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published