Sign inSign up

mgergi/php-fpm

By mgergi

•Updated over 4 years ago

php-fpm for various systems

Image
0

3.6K

mgergi/php-fpm repository overview

⁠How to use this image.

⁠With docker-compose

Here is an example using nginx, php-fpm and mariadb with docker-compse

version: '3'
services:
  web:
    image: nginx:alpine
    ports:
      - 127.0.0.1:8081:80/tcp
    volumes:
      - ./nginx_site.conf:/etc/nginx/conf.d/default.conf
      - webdir:/www:ro
    depends_on:
      - php
    restart: always
  php:
    image: mgergi/php-fpm:mediawiki
    environment:
      WWW_UID: 1001
      WWW_GID: 1001
    volumes:
      - ./php_pool.conf:/usr/local/etc/php-fpm.d/www.conf
      - webdir:/www
    depends_on:
      - sql
    restart: always
  sql:
    image: mariadb
    environment:
      MYSQL_ROOT_PASSWORD: Tn23HiirB0EeB9ZBAibarsFLxuUCrF7B
      MYSQL_USER: wikiadmin
      MYSQL_PASSWORD: 1BIq6UlSmKfQTSNEzZZ4X7Q2hhnSJUrd
      MYSQL_DATABASE: wiki
    volumes:
      - db_dir:/var/lib/mysql
    restart: always
volumes:
  db_dir:
  webdir:

The webdir volume must be mounted on a same path in both services. The files in webdir must be owned by a user whose UID is equal to WWW_UID.

⁠Image Variants

⁠php:<version>

This is the base variant, based on official php:fpm-alpine⁠.

⁠php:*grav

This image was created for Grav CMS⁠. It includes php-gd and php-zip.

⁠php:*mediawiki

This version was created for MediaWiki⁠ systems. It includes php-apcu, php-gd, php-intl, php-mysqli and php-zip extensions.

Tag summary

Content type

Image

Digest

Size

29.5 MB

Last updated

about 9 years ago

docker pull mgergi/php-fpm