Sign inSign up

aheadworks/php-laravel

By aheadworks

Updated almost 4 years ago

Image
0

1.0K

aheadworks/php-laravel repository overview

docker-php-m2

PHP-fpm preset to run Magento 2

General information

Supported versions

7.2, 7.3 and 7.4 are supported.

5.6, 7.0 and 7.1 are still available but deprecated. No rebuilds are planned for these tags.

Starting from 7.4 Composer 2 and Magento 2.4.0+ crontab is used by default -legacy images are built with composer 1 and an older Magento crontab file

PHP extensions bundled
  • bcmath
  • intl
  • mysqli
  • pdo_mysql
  • soap
  • sockets
  • xdebug
  • xsl
  • zip

Usage

Run mode

This image can run in fpm_only(default), cron_only or both.

In cron_only mode only crontab is launched with confg stored in conf/crontab

In fpm_only mode the cron is not launched.

To specify run mode, set MODE environment variable to corresponding value.

FPM configuration variables
  • FPM_USER, default www-data
  • FPM_GROUP, default www-data
  • FPM_UID
  • FPM_GID
PHP configuration variables
  • PHP_MEMORY_LIMIT, default 1024M
  • PHP_POST_MAX_SIZE, default 256M
  • PHP_UPLOAD_MAX_FILESIZE, default 256M
  • PHP_MAX_INPUT_VARS, default 100000
  • PHP_SESSION_GC_MAXLIFETIME, default 86400
  • PHP_REALPATH_CACHE_SIZE, default 10M
  • PHP_REALPATH_CACHE_TTL, default 7200
Mail configuration variables
  • SSMTP_HOST, default mail
  • SSMTP_PORT, default 25
  • SSMTP_USE_STARLTLS, defaults no
  • SSMTP_USE_TLS, defaults no
  • SSMTP_AUTH_USER
  • SSMTP_AUTH_PASSWORD
XDebug configuration variables
  • XDEBUG_ENABLED, defaults false. Set to 1 to enable XDebug
  • XDEBUG_IDEKEY, default PHPSTORM
  • XDEBUG_REMOTE_ENABLE, default on
  • XDEBUG_REMOTE_PORT, default 9001
  • XDEBUG_REMOTE_CONNECT_BACK, default 1
  • XDEBUG_REMOTE_HOST, default host.docker.internal

Contribution

Files & folders structure
  • bin
    • build - Scripts used at image build stage(e.g. install&compile PHP extensions)
    • cmd.sh - Docker command file executed on image startup
  • conf
    • crontab - crontab file for image in cron_only or both run mode
    • crontab-below-2.4.0 - crontab file for Magento versions prior to 2.4.0 image in cron_only or both run mode
    • ssmtp.conf.tpl - ssmtp config file
  • hooks
  • Dockerfile.template - template for version-specific dockerfiles used by update script
  • update.py - update script
Applying changes & generation

All version-specific sources are generated in generated folder from the files in root folder. After applying changes, run python3 update.py to generate required files and folders for specific PHP versions

Adding PHP version

To add specific PHP version, edit update.py file and add corresponding version

Tag summary

Content type

Image

Digest

sha256:42fcd8d12

Size

56.9 MB

Last updated

almost 4 years ago

docker pull aheadworks/php-laravel:7.4