Sign inSign up

foorschtbar/php-webserver

By foorschtbar

•Updated about 6 hours ago

This is an usefull extension of the official php:*-apache Docker image.

Image
1

10K+

foorschtbar/php-webserver repository overview

⁠php-webserver - A PHP Webserver

⁠ ⁠

This is an usefull extension of the official php:*-apache Docker image.

⁠Improvements

... compared to the official image:

  • PHP extensions: mysqli, mysql_pdo, imap, soap, imagick, yaml and op_cache
  • Apache Modules: mod_rewrite, mod_headers, mod_remoteip
  • Prepared for use behind a reverse proxy
  • Composer
  • Python 3 (with extra Docker tag python)

⁠Tags and Versions

TagPHP VersionBranchPython
latest8.5masterno
python8.5masteryes
develop8.5developno
8.58.5masterno
8.5-develop8.5developno
8.5-python8.5masteryes
8.5-python-develop8.5developyes

⁠Usage

Example docker-compose configuration:

services:
  web:
    image: foorschtbar/php-webserver
    container_name: <changeme>-web
    hostname: <changeme>
    restart: unless-stopped
    volumes:
      - ./data/web:/var/www/html/public
    environment:
      - "UID=1000"
      - "GID=1000"
    labels:
      - "com.centurylinklabs.watchtower.enable=true"
      - "traefik.enable=true"
      # Entrypoint and TLS
      - "traefik.http.routers.<changeme>.entrypoints=https"
      - "traefik.http.routers.<changeme>.rule=Host(`<changeme>`)"
      - "traefik.http.routers.<changeme>.tls.certresolver=le"
      # Loadbalancer
      - "traefik.http.services.<changeme>.loadbalancer.server.scheme=http"
      - "traefik.http.services.<changeme>.loadbalancer.server.port=80"
    networks:
      - internal
      - reverse-proxy
    depends_on:
      - db

  db:
    image: mariadb
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: unless-stopped
    container_name: <changeme>-db
    volumes:
      - ./data/db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=<changeme>
      - MYSQL_PASSWORD=<changeme>
      - MYSQL_DATABASE=<changeme>
      - MYSQL_USER=<changeme>
    networks:
      - internal
    ports:
      - 127.0.0.1:<changeme>:3306
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

networks:
  internal:
    external: false
  reverse-proxy:
    external: true

Tag summary

Content type

Image

Digest

sha256:33d41189a…

Size

258.2 MB

Last updated

about 6 hours ago

docker pull foorschtbar/php-webserver