Sign inSign up

vdeapps/phpfpm7_debian

By vdeapps

•Updated almost 7 years ago

Only PHP-FPM 7 + CLI + SENDMAIL

Image
0

391

vdeapps/phpfpm7_debian repository overview

⁠PHP-FPM 7 on Debian

⁠Volumes

⁠/var/www:/www

Directory where site is accessible

⁠./config:/config

Directory where the config is stored (php release, postfix).

⁠Variables

⁠LOCALE
TZ=Europe/Paris
LOCALE_GEN=fr_FR.UTF8 UTF-8
LANG=fr_FR.utf8
LC_ALL=fr_FR.utf8
⁠POSTFIX
USE_SENDMAIL=1
POSTFIX_RELAYHOST=<host_ip>

Make an alias from /www to $ALTERNATE_LINK_WWW

⁠PHP
PHP_FPM_LISTEN=9000
PHP_USER=1000
PHP_GROUP=1000
PHP_EXPOSE=Off

⁠Postfix config

All postfix config are in 'config' directory and is up when docker start

⁠Php config

You need to change user and group variables in ./config/php/7.?/php-fpm.d/www.conf⁠ Put the same UID and GID from your apache/nginx host, like

user = 33
group = 33 

⁠Apache2 configuration

⁠Modules

Activate module fcgi

a2enmod proxy_fcgi

and restart apache

⁠VHOST configuration

In your vhosts put:

DocumentRoot /var/www/mysite
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:**9000**/www/mysite/$1

⁠Run

docker run -p 9000:9000 -v /var/www/:/www --name phpfpm7 vdeapps/phpfpm7

⁠Mode CLI

make /usr/local/bin/php7.? and put:
#!/bin/bash
CMD="docker exec -it vdeapps_phpfpm7?_debian /usr/bin/php $*"
$CMD

Tag summary

Content type

Image

Digest

Size

127.8 MB

Last updated

almost 7 years ago

docker pull vdeapps/phpfpm7_debian:7.3