From 29ba0a785f6ca17e639554300fb344d2224e5e48 Mon Sep 17 00:00:00 2001 From: Michael Aguiar Date: Mon, 19 Oct 2026 16:01:46 -0700 Subject: [PATCH 1/2] Drop the fpm and fpm-nginx images Neither Alios nor Ingot uses them any more: both deploy the frankenphp variants, and Alios only ever builds php:-frankenphp[...] tags. Their X-fpm base tags were also deleted from GHCR in the 2026-10-15 prune, so the next fpm-nginx rebuild would fail (ALI-934). Removes php/{7.4,8.0,8.1,8.2}/{fpm,fpm-nginx}, their build-base legs and the build-dependent job (which only held fpm-nginx), and the README's FPM columns. The cli images stay. --- .github/workflows/build-and-push.yml | 80 +----- README.md | 22 +- php/7.4/fpm-nginx/Dockerfile | 43 ---- php/7.4/fpm-nginx/etc/msmtprc | 14 - .../fpm-nginx/etc/nginx/conf.d/default.conf | 83 ------ php/7.4/fpm-nginx/etc/nginx/nginx.conf | 69 ----- php/7.4/fpm-nginx/etc/nginx/php_fastcgi.conf | 21 -- .../etc/nginx/server-opts.d/performance.conf | 39 --- .../etc/nginx/server-opts.d/security.conf | 29 --- .../php/php-fpm.d/z-fpm-with-overrides.conf | 8 - php/7.4/fpm-nginx/etc/s6-rc.d/msmtp/type | 1 - php/7.4/fpm-nginx/etc/s6-rc.d/msmtp/up | 2 - .../fpm-nginx/etc/s6-rc.d/nginx/dependencies | 1 - php/7.4/fpm-nginx/etc/s6-rc.d/nginx/run | 12 - php/7.4/fpm-nginx/etc/s6-rc.d/nginx/type | 1 - .../etc/s6-rc.d/php-fpm-running/dependencies | 1 - .../etc/s6-rc.d/php-fpm-running/type | 1 - .../fpm-nginx/etc/s6-rc.d/php-fpm-running/up | 1 - .../etc/s6-rc.d/user/contents.d/msmtp | 0 .../etc/s6-rc.d/user/contents.d/nginx | 0 .../s6-rc.d/user/contents.d/php-fpm-running | 0 php/7.4/fpm-nginx/etc/scripts/msmtp-configure | 12 - php/7.4/fpm-nginx/etc/scripts/php-fpm-running | 10 - php/7.4/fpm/Dockerfile | 64 ----- .../php-fpm.d/y-override-php-defaults.conf | 242 ------------------ php/7.4/fpm/etc/s6-rc.d/php-fpm/run | 4 - php/7.4/fpm/etc/s6-rc.d/php-fpm/type | 1 - .../fpm/etc/s6-rc.d/user/contents.d/php-fpm | 0 php/8.0/fpm-nginx/.DS_Store | Bin 6148 -> 0 bytes php/8.0/fpm-nginx/Dockerfile | 43 ---- php/8.0/fpm-nginx/etc/msmtprc | 14 - .../fpm-nginx/etc/nginx/conf.d/default.conf | 83 ------ php/8.0/fpm-nginx/etc/nginx/nginx.conf | 69 ----- php/8.0/fpm-nginx/etc/nginx/php_fastcgi.conf | 21 -- .../etc/nginx/server-opts.d/performance.conf | 53 ---- .../etc/nginx/server-opts.d/security.conf | 29 --- .../php/php-fpm.d/z-fpm-with-overrides.conf | 8 - php/8.0/fpm-nginx/etc/s6-rc.d/msmtp/type | 1 - php/8.0/fpm-nginx/etc/s6-rc.d/msmtp/up | 2 - .../fpm-nginx/etc/s6-rc.d/nginx/dependencies | 1 - php/8.0/fpm-nginx/etc/s6-rc.d/nginx/run | 25 -- php/8.0/fpm-nginx/etc/s6-rc.d/nginx/type | 1 - .../etc/s6-rc.d/php-fpm-running/dependencies | 1 - .../etc/s6-rc.d/php-fpm-running/type | 1 - .../fpm-nginx/etc/s6-rc.d/php-fpm-running/up | 1 - .../etc/s6-rc.d/user/contents.d/msmtp | 0 .../etc/s6-rc.d/user/contents.d/nginx | 0 .../s6-rc.d/user/contents.d/php-fpm-running | 0 php/8.0/fpm-nginx/etc/scripts/msmtp-configure | 12 - php/8.0/fpm-nginx/etc/scripts/php-fpm-running | 10 - php/8.0/fpm/alpine/Dockerfile | 66 ----- .../php-fpm.d/y-override-php-defaults.conf | 242 ------------------ php/8.0/fpm/alpine/etc/s6-rc.d/php-fpm/run | 5 - php/8.0/fpm/alpine/etc/s6-rc.d/php-fpm/type | 1 - .../etc/s6-rc.d/user/contents.d/php-fpm | 0 php/8.0/fpm/ubuntu/Dockerfile | 64 ----- .../php-fpm.d/y-override-php-defaults.conf | 242 ------------------ php/8.0/fpm/ubuntu/etc/s6-rc.d/php-fpm/run | 5 - php/8.0/fpm/ubuntu/etc/s6-rc.d/php-fpm/type | 1 - .../etc/s6-rc.d/user/contents.d/php-fpm | 0 php/8.1/fpm-nginx/Dockerfile | 43 ---- php/8.1/fpm-nginx/etc/msmtprc | 14 - .../fpm-nginx/etc/nginx/conf.d/default.conf | 83 ------ php/8.1/fpm-nginx/etc/nginx/nginx.conf | 69 ----- php/8.1/fpm-nginx/etc/nginx/php_fastcgi.conf | 21 -- .../etc/nginx/server-opts.d/performance.conf | 53 ---- .../etc/nginx/server-opts.d/security.conf | 29 --- .../php/php-fpm.d/z-fpm-with-overrides.conf | 8 - php/8.1/fpm-nginx/etc/s6-rc.d/msmtp/type | 1 - php/8.1/fpm-nginx/etc/s6-rc.d/msmtp/up | 2 - .../fpm-nginx/etc/s6-rc.d/nginx/dependencies | 1 - php/8.1/fpm-nginx/etc/s6-rc.d/nginx/run | 25 -- php/8.1/fpm-nginx/etc/s6-rc.d/nginx/type | 1 - .../etc/s6-rc.d/php-fpm-running/dependencies | 1 - .../etc/s6-rc.d/php-fpm-running/type | 1 - .../fpm-nginx/etc/s6-rc.d/php-fpm-running/up | 1 - .../etc/s6-rc.d/user/contents.d/msmtp | 0 .../etc/s6-rc.d/user/contents.d/nginx | 0 .../s6-rc.d/user/contents.d/php-fpm-running | 0 php/8.1/fpm-nginx/etc/scripts/msmtp-configure | 12 - php/8.1/fpm-nginx/etc/scripts/php-fpm-running | 10 - php/8.1/fpm/Dockerfile | 66 ----- .../php-fpm.d/y-override-php-defaults.conf | 242 ------------------ php/8.1/fpm/etc/s6-rc.d/php-fpm/run | 5 - php/8.1/fpm/etc/s6-rc.d/php-fpm/type | 1 - .../fpm/etc/s6-rc.d/user/contents.d/php-fpm | 0 php/8.2/fpm-nginx/Dockerfile | 43 ---- php/8.2/fpm-nginx/etc/msmtprc | 14 - .../fpm-nginx/etc/nginx/conf.d/default.conf | 83 ------ php/8.2/fpm-nginx/etc/nginx/nginx.conf | 69 ----- php/8.2/fpm-nginx/etc/nginx/php_fastcgi.conf | 21 -- .../etc/nginx/server-opts.d/performance.conf | 53 ---- .../etc/nginx/server-opts.d/security.conf | 29 --- .../php/php-fpm.d/z-fpm-with-overrides.conf | 8 - php/8.2/fpm-nginx/etc/s6-rc.d/msmtp/type | 1 - php/8.2/fpm-nginx/etc/s6-rc.d/msmtp/up | 2 - .../fpm-nginx/etc/s6-rc.d/nginx/dependencies | 1 - php/8.2/fpm-nginx/etc/s6-rc.d/nginx/run | 25 -- php/8.2/fpm-nginx/etc/s6-rc.d/nginx/type | 1 - .../etc/s6-rc.d/php-fpm-running/dependencies | 1 - .../etc/s6-rc.d/php-fpm-running/type | 1 - .../fpm-nginx/etc/s6-rc.d/php-fpm-running/up | 1 - .../etc/s6-rc.d/user/contents.d/msmtp | 0 .../etc/s6-rc.d/user/contents.d/nginx | 0 .../s6-rc.d/user/contents.d/php-fpm-running | 0 php/8.2/fpm-nginx/etc/scripts/msmtp-configure | 12 - php/8.2/fpm-nginx/etc/scripts/php-fpm-running | 10 - php/8.2/fpm/Dockerfile | 65 ----- .../php-fpm.d/y-override-php-defaults.conf | 242 ------------------ php/8.2/fpm/etc/s6-rc.d/php-fpm/run | 5 - php/8.2/fpm/etc/s6-rc.d/php-fpm/type | 1 - .../fpm/etc/s6-rc.d/user/contents.d/php-fpm | 0 112 files changed, 17 insertions(+), 3122 deletions(-) delete mode 100644 php/7.4/fpm-nginx/Dockerfile delete mode 100644 php/7.4/fpm-nginx/etc/msmtprc delete mode 100644 php/7.4/fpm-nginx/etc/nginx/conf.d/default.conf delete mode 100644 php/7.4/fpm-nginx/etc/nginx/nginx.conf delete mode 100644 php/7.4/fpm-nginx/etc/nginx/php_fastcgi.conf delete mode 100644 php/7.4/fpm-nginx/etc/nginx/server-opts.d/performance.conf delete mode 100644 php/7.4/fpm-nginx/etc/nginx/server-opts.d/security.conf delete mode 100644 php/7.4/fpm-nginx/etc/php/php-fpm.d/z-fpm-with-overrides.conf delete mode 100644 php/7.4/fpm-nginx/etc/s6-rc.d/msmtp/type delete mode 100644 php/7.4/fpm-nginx/etc/s6-rc.d/msmtp/up delete mode 100644 php/7.4/fpm-nginx/etc/s6-rc.d/nginx/dependencies delete mode 100644 php/7.4/fpm-nginx/etc/s6-rc.d/nginx/run delete mode 100644 php/7.4/fpm-nginx/etc/s6-rc.d/nginx/type delete mode 100644 php/7.4/fpm-nginx/etc/s6-rc.d/php-fpm-running/dependencies delete mode 100644 php/7.4/fpm-nginx/etc/s6-rc.d/php-fpm-running/type delete mode 100644 php/7.4/fpm-nginx/etc/s6-rc.d/php-fpm-running/up delete mode 100644 php/7.4/fpm-nginx/etc/s6-rc.d/user/contents.d/msmtp delete mode 100644 php/7.4/fpm-nginx/etc/s6-rc.d/user/contents.d/nginx delete mode 100644 php/7.4/fpm-nginx/etc/s6-rc.d/user/contents.d/php-fpm-running delete mode 100644 php/7.4/fpm-nginx/etc/scripts/msmtp-configure delete mode 100644 php/7.4/fpm-nginx/etc/scripts/php-fpm-running delete mode 100644 php/7.4/fpm/Dockerfile delete mode 100644 php/7.4/fpm/etc/php/php-fpm.d/y-override-php-defaults.conf delete mode 100644 php/7.4/fpm/etc/s6-rc.d/php-fpm/run delete mode 100644 php/7.4/fpm/etc/s6-rc.d/php-fpm/type delete mode 100644 php/7.4/fpm/etc/s6-rc.d/user/contents.d/php-fpm delete mode 100644 php/8.0/fpm-nginx/.DS_Store delete mode 100644 php/8.0/fpm-nginx/Dockerfile delete mode 100644 php/8.0/fpm-nginx/etc/msmtprc delete mode 100644 php/8.0/fpm-nginx/etc/nginx/conf.d/default.conf delete mode 100644 php/8.0/fpm-nginx/etc/nginx/nginx.conf delete mode 100644 php/8.0/fpm-nginx/etc/nginx/php_fastcgi.conf delete mode 100644 php/8.0/fpm-nginx/etc/nginx/server-opts.d/performance.conf delete mode 100644 php/8.0/fpm-nginx/etc/nginx/server-opts.d/security.conf delete mode 100644 php/8.0/fpm-nginx/etc/php/php-fpm.d/z-fpm-with-overrides.conf delete mode 100644 php/8.0/fpm-nginx/etc/s6-rc.d/msmtp/type delete mode 100644 php/8.0/fpm-nginx/etc/s6-rc.d/msmtp/up delete mode 100644 php/8.0/fpm-nginx/etc/s6-rc.d/nginx/dependencies delete mode 100644 php/8.0/fpm-nginx/etc/s6-rc.d/nginx/run delete mode 100644 php/8.0/fpm-nginx/etc/s6-rc.d/nginx/type delete mode 100644 php/8.0/fpm-nginx/etc/s6-rc.d/php-fpm-running/dependencies delete mode 100644 php/8.0/fpm-nginx/etc/s6-rc.d/php-fpm-running/type delete mode 100644 php/8.0/fpm-nginx/etc/s6-rc.d/php-fpm-running/up delete mode 100644 php/8.0/fpm-nginx/etc/s6-rc.d/user/contents.d/msmtp delete mode 100644 php/8.0/fpm-nginx/etc/s6-rc.d/user/contents.d/nginx delete mode 100644 php/8.0/fpm-nginx/etc/s6-rc.d/user/contents.d/php-fpm-running delete mode 100644 php/8.0/fpm-nginx/etc/scripts/msmtp-configure delete mode 100644 php/8.0/fpm-nginx/etc/scripts/php-fpm-running delete mode 100644 php/8.0/fpm/alpine/Dockerfile delete mode 100644 php/8.0/fpm/alpine/etc/php/php-fpm.d/y-override-php-defaults.conf delete mode 100644 php/8.0/fpm/alpine/etc/s6-rc.d/php-fpm/run delete mode 100644 php/8.0/fpm/alpine/etc/s6-rc.d/php-fpm/type delete mode 100644 php/8.0/fpm/alpine/etc/s6-rc.d/user/contents.d/php-fpm delete mode 100644 php/8.0/fpm/ubuntu/Dockerfile delete mode 100644 php/8.0/fpm/ubuntu/etc/php/php-fpm.d/y-override-php-defaults.conf delete mode 100644 php/8.0/fpm/ubuntu/etc/s6-rc.d/php-fpm/run delete mode 100644 php/8.0/fpm/ubuntu/etc/s6-rc.d/php-fpm/type delete mode 100644 php/8.0/fpm/ubuntu/etc/s6-rc.d/user/contents.d/php-fpm delete mode 100644 php/8.1/fpm-nginx/Dockerfile delete mode 100644 php/8.1/fpm-nginx/etc/msmtprc delete mode 100644 php/8.1/fpm-nginx/etc/nginx/conf.d/default.conf delete mode 100644 php/8.1/fpm-nginx/etc/nginx/nginx.conf delete mode 100644 php/8.1/fpm-nginx/etc/nginx/php_fastcgi.conf delete mode 100644 php/8.1/fpm-nginx/etc/nginx/server-opts.d/performance.conf delete mode 100644 php/8.1/fpm-nginx/etc/nginx/server-opts.d/security.conf delete mode 100644 php/8.1/fpm-nginx/etc/php/php-fpm.d/z-fpm-with-overrides.conf delete mode 100644 php/8.1/fpm-nginx/etc/s6-rc.d/msmtp/type delete mode 100644 php/8.1/fpm-nginx/etc/s6-rc.d/msmtp/up delete mode 100644 php/8.1/fpm-nginx/etc/s6-rc.d/nginx/dependencies delete mode 100644 php/8.1/fpm-nginx/etc/s6-rc.d/nginx/run delete mode 100644 php/8.1/fpm-nginx/etc/s6-rc.d/nginx/type delete mode 100644 php/8.1/fpm-nginx/etc/s6-rc.d/php-fpm-running/dependencies delete mode 100644 php/8.1/fpm-nginx/etc/s6-rc.d/php-fpm-running/type delete mode 100644 php/8.1/fpm-nginx/etc/s6-rc.d/php-fpm-running/up delete mode 100644 php/8.1/fpm-nginx/etc/s6-rc.d/user/contents.d/msmtp delete mode 100644 php/8.1/fpm-nginx/etc/s6-rc.d/user/contents.d/nginx delete mode 100644 php/8.1/fpm-nginx/etc/s6-rc.d/user/contents.d/php-fpm-running delete mode 100644 php/8.1/fpm-nginx/etc/scripts/msmtp-configure delete mode 100644 php/8.1/fpm-nginx/etc/scripts/php-fpm-running delete mode 100644 php/8.1/fpm/Dockerfile delete mode 100644 php/8.1/fpm/etc/php/php-fpm.d/y-override-php-defaults.conf delete mode 100644 php/8.1/fpm/etc/s6-rc.d/php-fpm/run delete mode 100644 php/8.1/fpm/etc/s6-rc.d/php-fpm/type delete mode 100644 php/8.1/fpm/etc/s6-rc.d/user/contents.d/php-fpm delete mode 100644 php/8.2/fpm-nginx/Dockerfile delete mode 100644 php/8.2/fpm-nginx/etc/msmtprc delete mode 100644 php/8.2/fpm-nginx/etc/nginx/conf.d/default.conf delete mode 100644 php/8.2/fpm-nginx/etc/nginx/nginx.conf delete mode 100644 php/8.2/fpm-nginx/etc/nginx/php_fastcgi.conf delete mode 100644 php/8.2/fpm-nginx/etc/nginx/server-opts.d/performance.conf delete mode 100644 php/8.2/fpm-nginx/etc/nginx/server-opts.d/security.conf delete mode 100644 php/8.2/fpm-nginx/etc/php/php-fpm.d/z-fpm-with-overrides.conf delete mode 100644 php/8.2/fpm-nginx/etc/s6-rc.d/msmtp/type delete mode 100644 php/8.2/fpm-nginx/etc/s6-rc.d/msmtp/up delete mode 100644 php/8.2/fpm-nginx/etc/s6-rc.d/nginx/dependencies delete mode 100644 php/8.2/fpm-nginx/etc/s6-rc.d/nginx/run delete mode 100644 php/8.2/fpm-nginx/etc/s6-rc.d/nginx/type delete mode 100644 php/8.2/fpm-nginx/etc/s6-rc.d/php-fpm-running/dependencies delete mode 100644 php/8.2/fpm-nginx/etc/s6-rc.d/php-fpm-running/type delete mode 100644 php/8.2/fpm-nginx/etc/s6-rc.d/php-fpm-running/up delete mode 100644 php/8.2/fpm-nginx/etc/s6-rc.d/user/contents.d/msmtp delete mode 100644 php/8.2/fpm-nginx/etc/s6-rc.d/user/contents.d/nginx delete mode 100644 php/8.2/fpm-nginx/etc/s6-rc.d/user/contents.d/php-fpm-running delete mode 100644 php/8.2/fpm-nginx/etc/scripts/msmtp-configure delete mode 100644 php/8.2/fpm-nginx/etc/scripts/php-fpm-running delete mode 100644 php/8.2/fpm/Dockerfile delete mode 100644 php/8.2/fpm/etc/php/php-fpm.d/y-override-php-defaults.conf delete mode 100644 php/8.2/fpm/etc/s6-rc.d/php-fpm/run delete mode 100644 php/8.2/fpm/etc/s6-rc.d/php-fpm/type delete mode 100644 php/8.2/fpm/etc/s6-rc.d/user/contents.d/php-fpm diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index cbf8de1..d1a73b2 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -74,17 +74,8 @@ jobs: with: files: | php/7.4/cli/Dockerfile - php/7.4/fpm/Dockerfile - php/7.4/fpm-nginx/Dockerfile php/8.0/cli/Dockerfile - php/8.0/fpm/alpine/Dockerfile - php/8.0/fpm/ubuntu/Dockerfile - php/8.0/fpm-nginx/Dockerfile php/8.1/cli/Dockerfile - php/8.1/fpm/Dockerfile - php/8.1/fpm-nginx/Dockerfile - php/8.2/fpm/Dockerfile - php/8.2/fpm-nginx/Dockerfile php/8.2/frankenphp/Dockerfile php/8.2/frankenphp/Dockerfile.dev php/8.2/frankenphp/Dockerfile.wordpress @@ -125,13 +116,8 @@ jobs: matrix: include: - { name: 7.4-cli, context: php/7.4/cli, file: php/7.4/cli/Dockerfile, platforms: "linux/amd64,linux/arm64", force_input: build_php_74, tag: 7.4-cli } - - { name: 7.4-fpm, context: php/7.4/fpm, file: php/7.4/fpm/Dockerfile, platforms: "linux/amd64,linux/arm64", force_input: build_php_74, tag: 7.4-fpm } - { name: 8.0-cli, context: php/8.0/cli, file: php/8.0/cli/Dockerfile, platforms: "linux/amd64,linux/arm64", force_input: build_php_80, tag: 8.0-cli } - - { name: 8.0-fpm-alpine, context: php/8.0/fpm/alpine, file: php/8.0/fpm/alpine/Dockerfile, platforms: "linux/amd64,linux/arm64", force_input: build_php_80, tag: 8.0-fpm-alpine } - - { name: 8.0-fpm-ubuntu, context: php/8.0/fpm/ubuntu, file: php/8.0/fpm/ubuntu/Dockerfile, platforms: "linux/amd64", force_input: build_php_80, tag: 8.0-fpm-ubuntu } - { name: 8.1-cli, context: php/8.1/cli, file: php/8.1/cli/Dockerfile, platforms: "linux/amd64,linux/arm64", force_input: build_php_81, tag: 8.1-cli } - - { name: 8.1-fpm, context: php/8.1/fpm, file: php/8.1/fpm/Dockerfile, platforms: "linux/amd64,linux/arm64", force_input: build_php_81, tag: 8.1-fpm } - - { name: 8.2-fpm, context: php/8.2/fpm, file: php/8.2/fpm/Dockerfile, platforms: "linux/amd64,linux/arm64", force_input: build_php_82, tag: 8.2-fpm } - { name: 8.3-cli, context: php/8.3/cli, file: php/8.3/cli/Dockerfile, platforms: "linux/amd64,linux/arm64", force_input: build_php_83, tag: 8.3-cli } - { name: 8.4-cli, context: php/8.4/cli, file: php/8.4/cli/Dockerfile, platforms: "linux/amd64,linux/arm64", force_input: build_php_84, tag: 8.4-cli } - { name: 8.5-cli, context: php/8.5/cli, file: php/8.5/cli/Dockerfile, platforms: "linux/amd64,linux/arm64", force_input: build_php_85, tag: 8.5-cli } @@ -287,65 +273,13 @@ jobs: -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.version }}-frankenphp-${{ github.sha }} \ $(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *) - # Everything that's FROM an image build-base just pushed, minus frankenphp - # (that has its own dependent stage below). needs: build-base only pulls - # in the fast (<1 min) legs now that frankenphp moved out, so this no - # longer inherits frankenphp's build time at all. - build-dependent: - needs: [detect-changes, build-base] - if: ${{ !cancelled() }} - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - strategy: - fail-fast: false - matrix: - include: - - { name: 7.4-fpm-nginx, context: php/7.4/fpm-nginx, file: php/7.4/fpm-nginx/Dockerfile, parent_file: php/7.4/fpm/Dockerfile, platforms: "linux/amd64,linux/arm64", force_input: build_php_74, tag: 7.4-fpm-nginx } - - { name: 8.0-fpm-nginx, context: php/8.0/fpm-nginx, file: php/8.0/fpm-nginx/Dockerfile, parent_file: "", platforms: "linux/amd64,linux/arm64", force_input: build_php_80, tag: 8.0-fpm-nginx } - - { name: 8.1-fpm-nginx, context: php/8.1/fpm-nginx, file: php/8.1/fpm-nginx/Dockerfile, parent_file: php/8.1/fpm/Dockerfile, platforms: "linux/amd64,linux/arm64", force_input: build_php_81, tag: 8.1-fpm-nginx } - - { name: 8.2-fpm-nginx, context: php/8.2/fpm-nginx, file: php/8.2/fpm-nginx/Dockerfile, parent_file: php/8.2/fpm/Dockerfile, platforms: "linux/amd64,linux/arm64", force_input: build_php_82, tag: 8.2-fpm-nginx } - steps: - - name: Checkout code - uses: actions/checkout@v7 - - - name: Set up QEMU - if: contains(matrix.platforms, 'arm64') - uses: docker/setup-qemu-action@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v4 - - - name: Log in to GHCR - uses: docker/login-action@v4 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push ${{ matrix.name }} - if: ${{ inputs.force_build_all || inputs[matrix.force_input] || contains(needs.detect-changes.outputs.changed_files, matrix.file) || (matrix.parent_file != '' && contains(needs.detect-changes.outputs.changed_files, matrix.parent_file)) }} - uses: docker/build-push-action@v7 - with: - context: ${{ matrix.context }} - file: ${{ matrix.file }} - push: true - platforms: ${{ matrix.platforms }} - tags: | - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.tag }} - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.tag }}-latest - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.tag }}-${{ github.sha }} - cache-from: type=gha,scope=${{ matrix.name }} - cache-to: type=gha,mode=max,scope=${{ matrix.name }} - # frankenphp-dev and frankenphp-wordpress, same digest-split/native-arm64 # treatment as build-frankenphp-base and for the same reason: both FROM # the frankenphp base and both install real extensions (wordpress in # particular adds imagick, the single heaviest one in either Dockerfile). # needs: merge-frankenphp-base (not build-base) so this only waits on the # frankenphp base manifests actually being on the registry, not on the - # unrelated fast cli/fpm legs. + # unrelated fast cli legs. build-frankenphp-dependent: needs: [detect-changes, merge-frankenphp-base] if: ${{ !cancelled() }} @@ -482,7 +416,7 @@ jobs: summary: runs-on: ubuntu-latest - needs: [build-base, build-dependent, merge-frankenphp-base, merge-frankenphp-dependent] + needs: [build-base, merge-frankenphp-base, merge-frankenphp-dependent] if: always() steps: - name: Build Summary @@ -492,12 +426,12 @@ jobs: echo "**Registry:** \`ghcr.io/${{ github.repository }}\`" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "**Available Images:**" >> $GITHUB_STEP_SUMMARY - echo "- **PHP 7.4:** \`7.4-cli-latest\`, \`7.4-fpm-latest\`, \`7.4-fpm-nginx-latest\`" >> $GITHUB_STEP_SUMMARY - echo "- **PHP 8.0:** \`8.0-cli-latest\`, \`8.0-fpm-alpine-latest\`, \`8.0-fpm-ubuntu-latest\`, \`8.0-fpm-nginx-latest\`" >> $GITHUB_STEP_SUMMARY - echo "- **PHP 8.1:** \`8.1-cli-latest\`, \`8.1-fpm-latest\`, \`8.1-fpm-nginx-latest\`" >> $GITHUB_STEP_SUMMARY - echo "- **PHP 8.2:** \`8.2-fpm-latest\`, \`8.2-fpm-nginx-latest\`, \`8.2-frankenphp-latest\`, \`8.2-frankenphp-dev-latest\`, \`8.2-frankenphp-wordpress-latest\`" >> $GITHUB_STEP_SUMMARY + echo "- **PHP 7.4:** \`7.4-cli-latest\`" >> $GITHUB_STEP_SUMMARY + echo "- **PHP 8.0:** \`8.0-cli-latest\`" >> $GITHUB_STEP_SUMMARY + echo "- **PHP 8.1:** \`8.1-cli-latest\`" >> $GITHUB_STEP_SUMMARY + echo "- **PHP 8.2:** \`8.2-frankenphp-latest\`, \`8.2-frankenphp-dev-latest\`, \`8.2-frankenphp-wordpress-latest\`" >> $GITHUB_STEP_SUMMARY echo "- **PHP 8.3:** \`8.3-cli-latest\`, \`8.3-frankenphp-latest\`, \`8.3-frankenphp-dev-latest\`, \`8.3-frankenphp-wordpress-latest\`" >> $GITHUB_STEP_SUMMARY echo "- **PHP 8.4:** \`8.4-cli-latest\`, \`8.4-frankenphp-latest\`, \`8.4-frankenphp-dev-latest\`, \`8.4-frankenphp-wordpress-latest\`" >> $GITHUB_STEP_SUMMARY echo "- **PHP 8.5:** \`8.5-cli-latest\`, \`8.5-frankenphp-latest\`, \`8.5-frankenphp-dev-latest\`, \`8.5-frankenphp-wordpress-latest\`" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - echo "**Status:** ${{ (needs.build-base.result == 'success' && needs.build-dependent.result == 'success' && needs.merge-frankenphp-base.result == 'success' && needs.merge-frankenphp-dependent.result == 'success') && '✅ All builds successful!' || '❌ Some builds failed' }}" >> $GITHUB_STEP_SUMMARY + echo "**Status:** ${{ (needs.build-base.result == 'success' && needs.merge-frankenphp-base.result == 'success' && needs.merge-frankenphp-dependent.result == 'success') && '✅ All builds successful!' || '❌ Some builds failed' }}" >> $GITHUB_STEP_SUMMARY diff --git a/README.md b/README.md index 01b1a28..aedd096 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@ # docker-php -Docker images for PHP, published to `ghcr.io/aliasproject/php`. The primary offering is [FrankenPHP](https://frankenphp.dev/) (Caddy + PHP) for 8.2–8.5, plus CLI images for the same versions. Older FPM-based images (7.4–8.2) remain published for existing consumers but are being phased out in favor of FrankenPHP. +Docker images for PHP, published to `ghcr.io/aliasproject/php`. The primary offering is [FrankenPHP](https://frankenphp.dev/) (Caddy + PHP) for 8.2–8.5, plus CLI images for the same versions. CLI images are also published for 7.4–8.1. ## Image matrix -| PHP | CLI | FPM | FPM + nginx | FrankenPHP | FrankenPHP (dev) | FrankenPHP (WordPress) | -|------|:---:|:----------------:|:-----------:|:----------:|:-----------------:|:------------------------:| -| 7.4 | ✅ | ✅ | ✅ | | | | -| 8.0 | ✅ | ✅ alpine/ubuntu | ✅ | | | | -| 8.1 | ✅ | ✅ | ✅ | | | | -| 8.2 | | ✅ | ✅ | ✅ | ✅ | ✅ | -| 8.3 | ✅ | | | ✅ | ✅ | ✅ | -| 8.4 | ✅ | | | ✅ | ✅ | ✅ | -| 8.5 | ✅ | | | ✅ | ✅ | ✅ | +| PHP | CLI | FrankenPHP | FrankenPHP (dev) | FrankenPHP (WordPress) | +|------|:---:|:----------:|:-----------------:|:------------------------:| +| 7.4 | ✅ | | | | +| 8.0 | ✅ | | | | +| 8.1 | ✅ | | | | +| 8.2 | | ✅ | ✅ | ✅ | +| 8.3 | ✅ | ✅ | ✅ | ✅ | +| 8.4 | ✅ | ✅ | ✅ | ✅ | +| 8.5 | ✅ | ✅ | ✅ | ✅ | Tags follow `-` (e.g. `8.4-frankenphp-wordpress`), each also published as `-latest` and pinned to a commit as `-`. @@ -23,8 +23,6 @@ docker pull ghcr.io/aliasproject/php:8.4-frankenphp ## Variants - **cli** — Alpine + the PHP CLI SAPI and a minimal extension set (`pdo_mysql`, `bcmath`, `pcntl`, `posix`, etc.), unlimited execution time, runs as an unprivileged `appuser` in group `0`. -- **fpm** *(legacy)* — PHP-FPM under s6-overlay, configurable pool sizing via `PHP_PM_*` env vars. -- **fpm-nginx** *(legacy)* — the `fpm` image plus nginx in front of it. - **frankenphp** — FrankenPHP serves PHP directly through Caddy; no separate web server. Minimal extension set, non-root by default, mail sent through `msmtp`, Composer baked in, `HEALTHCHECK` against Caddy's admin API. - **frankenphp (dev)** — the FrankenPHP base with extra extensions (`mysqli`, `gd`, `exif`, `imagick`, `redis`, `igbinary`, `soap`) for local development. - **frankenphp (wordpress)** — the FrankenPHP base with the same extensions as `dev`, plus a hardening policy suited to running WordPress (see below). diff --git a/php/7.4/fpm-nginx/Dockerfile b/php/7.4/fpm-nginx/Dockerfile deleted file mode 100644 index ceabb3c..0000000 --- a/php/7.4/fpm-nginx/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM ghcr.io/aliasproject/php:7.4-fpm - -LABEL maintainer="Michael Aguiar " - -ENV HTTP2=true \ - PORT=80 \ - MSMTP_RELAY_SERVER_HOST= \ - MSMTP_RELAY_SERVER_PORT= \ - MSMTP_RELAY_SERVER_AUTH= \ - MSMTP_RELAY_SERVER_USER= \ - MSMTP_RELAY_SERVER_PASSWORD= \ - MSMTP_RELAY_SERVER_FROM= \ - PHP_POOL_NAME="www" \ - PHP_PM_CONTROL="ondemand" \ - PHP_PM_MAX_CHILDREN="20" \ - PHP_PM_START_SERVERS="2" \ - PHP_PM_MIN_SPARE_SERVERS="1" \ - PHP_PM_MAX_SPARE_SERVERS="3" - -# Copy over S6 configurations -COPY etc/s6-rc.d/ /etc/s6-overlay/s6-rc.d -COPY etc/scripts /etc/s6-overlay/scripts - -RUN apk add --update --no-cache nginx msmtp && \ - mkdir /var/run/php && \ - chmod u+x -R /etc/s6-overlay/scripts && \ - chown -R alias.alias /var/lib/nginx && \ - chown -R alias.alias /var/log/nginx - -# Configure NGINX -COPY etc/nginx/nginx.conf /etc/nginx/nginx.conf -COPY etc/nginx/php_fastcgi.conf /etc/nginx/php_fastcgi.conf -COPY etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf -COPY etc/nginx/server-opts.d /etc/nginx/server-opts.d - -# Configure MSMTP -COPY etc/msmtprc /etc/msmtprc - -# Configure PHP -COPY etc/php/php-fpm.d/z-fpm-with-overrides.conf /etc/php7/php-fpm.d/z-fpm-with-overrides.conf - -# Run S6 -ENTRYPOINT ["/init"] diff --git a/php/7.4/fpm-nginx/etc/msmtprc b/php/7.4/fpm-nginx/etc/msmtprc deleted file mode 100644 index f7bfbfc..0000000 --- a/php/7.4/fpm-nginx/etc/msmtprc +++ /dev/null @@ -1,14 +0,0 @@ -defaults -tls on -tls_trust_file /etc/ssl/certs/ca-certificates.crt -logfile - - -account default_account -host ${MSMTP_RELAY_SERVER_HOST} -port ${MSMTP_RELAY_SERVER_PORT} -auth ${MSMTP_RELAY_SERVER_AUTH} -user ${MSMTP_RELAY_SERVER_USER} -password ${MSMTP_RELAY_SERVER_PASSWORD} -from ${MSMTP_RELAY_SERVER_FROM} - -account default : default_account diff --git a/php/7.4/fpm-nginx/etc/nginx/conf.d/default.conf b/php/7.4/fpm-nginx/etc/nginx/conf.d/default.conf deleted file mode 100644 index 6fbeee7..0000000 --- a/php/7.4/fpm-nginx/etc/nginx/conf.d/default.conf +++ /dev/null @@ -1,83 +0,0 @@ -# server { -# listen 80 default_server; -# listen [::]:80 default_server; -# -# server_name _; -# -# # Redirect all HTTP traffic to HTTPS -# return 301 https://$host$request_uri; -# } - -server { - listen 80 default_server; - listen [::]:80 default_server; - - server_name _; - set $base /app; - root $base/public; - - ## - # Set Headers - ## - - proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; - - ## - # Allowed index files - ## - - index index.html index.htm index.php ; - - charset utf-8; - - ## - # Set max upload to 2048M - ## - - client_max_body_size 2048M; - - ## - # Health check - ## - - location /ping { - access_log off; - - # set max 5 seconds for health check - fastcgi_read_timeout 5s; - - include fastcgi_params; - fastcgi_param SCRIPT_NAME /ping; - fastcgi_param SCRIPT_FILENAME /ping; - fastcgi_pass unix:/var/run/php/php-fpm.sock; - } - - ## - # PHP try_files - ## - - location / { - try_files $uri $uri/ /index.php?$query_string; - } - - # Redirect server error pages to the static page /50x.html - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /var/lib/nginx/html; - } - - ## - # Run PHP files with PHP-FPM - ## - - location ~ \.php$ { - fastcgi_pass 127.0.0.1:9000; - include /etc/nginx/php_fastcgi.conf; - } - - ## - # Additional Config - ## - - include /etc/nginx/server-opts.d/*.conf; -} diff --git a/php/7.4/fpm-nginx/etc/nginx/nginx.conf b/php/7.4/fpm-nginx/etc/nginx/nginx.conf deleted file mode 100644 index e390253..0000000 --- a/php/7.4/fpm-nginx/etc/nginx/nginx.conf +++ /dev/null @@ -1,69 +0,0 @@ -user alias alias; -worker_processes auto; -pid /run/nginx.pid; -daemon off; - -events { - worker_connections 768; -} - -http { - ## - # General Settings - ## - - charset utf-8; - sendfile on; - tcp_nopush on; - tcp_nodelay on; - keepalive_timeout 65; - types_hash_max_size 2048; - types_hash_bucket_size 64; - server_tokens off; - - ## - # Set Mime Types - ## - include mime.types; - default_type application/octet-stream; - - ## - # SSL Settings - ## - - ssl_session_timeout 1d; - ssl_session_cache shared:SSL:10m; - ssl_session_tickets off; - - # Diffie-Hellman parameter for DHE ciphersuites - ssl_dhparam /etc/nginx/dhparam.pem; - - # Mozilla Intermediate configuration - ssl_protocols TLSv1.2 TLSv1.3; - ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; - - # OCSP Stapling - ssl_stapling on; - ssl_stapling_verify on; - resolver 1.1.1.1 1.0.0.1 8.8.8.8 8.8.4.4 208.67.222.222 208.67.220.220 valid=60s; - resolver_timeout 2s; - - ## - # Logging Settings - ## - - access_log /dev/stdout; - error_log /dev/stderr; - - # Define custom log format to include response times - log_format main_timed '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for" ' - '$request_time $upstream_response_time $pipe $upstream_cache_status'; - - ## - # Virtual Host Configs - ## - - include /etc/nginx/conf.d/*.conf; -} diff --git a/php/7.4/fpm-nginx/etc/nginx/php_fastcgi.conf b/php/7.4/fpm-nginx/etc/nginx/php_fastcgi.conf deleted file mode 100644 index ccda224..0000000 --- a/php/7.4/fpm-nginx/etc/nginx/php_fastcgi.conf +++ /dev/null @@ -1,21 +0,0 @@ -## -# PHP FastCGI Configurations -## - -# 404 -try_files $fastcgi_script_name =404; - -# default fastcgi_params -include fastcgi_params; - -# fastcgi settings -fastcgi_index index.php; -fastcgi_buffers 64 4k; -fastcgi_buffer_size 16k; -fastcgi_busy_buffers_size 24k; -fastcgi_buffering off; - -# fastcgi params -fastcgi_param DOCUMENT_ROOT $realpath_root; -fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; -fastcgi_param PHP_ADMIN_VALUE "open_basedir=$base/:/usr/lib/php/:/tmp/"; diff --git a/php/7.4/fpm-nginx/etc/nginx/server-opts.d/performance.conf b/php/7.4/fpm-nginx/etc/nginx/server-opts.d/performance.conf deleted file mode 100644 index ea561c5..0000000 --- a/php/7.4/fpm-nginx/etc/nginx/server-opts.d/performance.conf +++ /dev/null @@ -1,39 +0,0 @@ -## -# Performance Settings -## - -# favicon.ico -location = /favicon.ico { - log_not_found off; - access_log off; -} - -# robots.txt -location = /robots.txt { - log_not_found off; - access_log off; -} - -# assets, media -location ~* \.(txt|xml|js)$ { - expires 1y; -} - -location ~* \.(css)$ { - expires 1y; -} - -location ~* \.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|woff2|svg)$ { - expires 1y; -} - -location ~* \.(jpg|jpeg|png|gif|swf|webp)$ { - expires 1y; -} - -# gzip -gzip on; -gzip_vary on; -gzip_proxied any; -gzip_comp_level 6; -gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml; diff --git a/php/7.4/fpm-nginx/etc/nginx/server-opts.d/security.conf b/php/7.4/fpm-nginx/etc/nginx/server-opts.d/security.conf deleted file mode 100644 index 04198f5..0000000 --- a/php/7.4/fpm-nginx/etc/nginx/server-opts.d/security.conf +++ /dev/null @@ -1,29 +0,0 @@ -## -# Security Headers -## - -# Prevent IFRAME spoofing attacks -add_header X-Frame-Options "SAMEORIGIN" always; - -# Configure X-XSS Protection -add_header X-XSS-Protection "1; mode=block" always; - -# Prevent MIME attacks -add_header X-Content-Type-Options "nosniff" always; - -# Prevent Referrer URL from being leaked -add_header Referrer-Policy "no-referrer-when-downgrade" always; - -# Configure Content Security Policy -#add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'; frame-ancestors 'self';" always; - -# Configure Permissions Policy -add_header Permissions-Policy "interest-cohort=()" always; - -# Enable HSTS -add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; - -# Prevent access to . files (excent the well-known directory) -location ~ /\.(?!well-known) { - deny all; -} diff --git a/php/7.4/fpm-nginx/etc/php/php-fpm.d/z-fpm-with-overrides.conf b/php/7.4/fpm-nginx/etc/php/php-fpm.d/z-fpm-with-overrides.conf deleted file mode 100644 index 28ed8b3..0000000 --- a/php/7.4/fpm-nginx/etc/php/php-fpm.d/z-fpm-with-overrides.conf +++ /dev/null @@ -1,8 +0,0 @@ -[${PHP_POOL_NAME}] - -; Access from webserver container is via network, not socket file -listen = [::]:9000 -listen.allowed_clients = 127.0.0.1 -listen.owner = alias -listen.group = alias -listen.mode = 0660 diff --git a/php/7.4/fpm-nginx/etc/s6-rc.d/msmtp/type b/php/7.4/fpm-nginx/etc/s6-rc.d/msmtp/type deleted file mode 100644 index 3d92b15..0000000 --- a/php/7.4/fpm-nginx/etc/s6-rc.d/msmtp/type +++ /dev/null @@ -1 +0,0 @@ -oneshot \ No newline at end of file diff --git a/php/7.4/fpm-nginx/etc/s6-rc.d/msmtp/up b/php/7.4/fpm-nginx/etc/s6-rc.d/msmtp/up deleted file mode 100644 index 63644c3..0000000 --- a/php/7.4/fpm-nginx/etc/s6-rc.d/msmtp/up +++ /dev/null @@ -1,2 +0,0 @@ -with-contenv -ash /etc/s6-overlay/scripts/msmtp-configure \ No newline at end of file diff --git a/php/7.4/fpm-nginx/etc/s6-rc.d/nginx/dependencies b/php/7.4/fpm-nginx/etc/s6-rc.d/nginx/dependencies deleted file mode 100644 index 372227b..0000000 --- a/php/7.4/fpm-nginx/etc/s6-rc.d/nginx/dependencies +++ /dev/null @@ -1 +0,0 @@ -php-fpm-running \ No newline at end of file diff --git a/php/7.4/fpm-nginx/etc/s6-rc.d/nginx/run b/php/7.4/fpm-nginx/etc/s6-rc.d/nginx/run deleted file mode 100644 index ab9d245..0000000 --- a/php/7.4/fpm-nginx/etc/s6-rc.d/nginx/run +++ /dev/null @@ -1,12 +0,0 @@ -#!/command/with-contenv ash - -# Set Port -if [ $HTTP2 == "true" ] -then - sed -i -r "s/80 default_server;/${PORT} default_server http2;/g" /etc/nginx/conf.d/default.conf -else - sed -i -r "s/80 default_server;/${PORT} default_server;/g" /etc/nginx/conf.d/default.conf -fi - -# Start NGINX -nginx diff --git a/php/7.4/fpm-nginx/etc/s6-rc.d/nginx/type b/php/7.4/fpm-nginx/etc/s6-rc.d/nginx/type deleted file mode 100644 index 1780f9f..0000000 --- a/php/7.4/fpm-nginx/etc/s6-rc.d/nginx/type +++ /dev/null @@ -1 +0,0 @@ -longrun \ No newline at end of file diff --git a/php/7.4/fpm-nginx/etc/s6-rc.d/php-fpm-running/dependencies b/php/7.4/fpm-nginx/etc/s6-rc.d/php-fpm-running/dependencies deleted file mode 100644 index 54f9367..0000000 --- a/php/7.4/fpm-nginx/etc/s6-rc.d/php-fpm-running/dependencies +++ /dev/null @@ -1 +0,0 @@ -php-fpm \ No newline at end of file diff --git a/php/7.4/fpm-nginx/etc/s6-rc.d/php-fpm-running/type b/php/7.4/fpm-nginx/etc/s6-rc.d/php-fpm-running/type deleted file mode 100644 index 3d92b15..0000000 --- a/php/7.4/fpm-nginx/etc/s6-rc.d/php-fpm-running/type +++ /dev/null @@ -1 +0,0 @@ -oneshot \ No newline at end of file diff --git a/php/7.4/fpm-nginx/etc/s6-rc.d/php-fpm-running/up b/php/7.4/fpm-nginx/etc/s6-rc.d/php-fpm-running/up deleted file mode 100644 index 45bc2dc..0000000 --- a/php/7.4/fpm-nginx/etc/s6-rc.d/php-fpm-running/up +++ /dev/null @@ -1 +0,0 @@ -ash /etc/s6-overlay/scripts/php-fpm-running \ No newline at end of file diff --git a/php/7.4/fpm-nginx/etc/s6-rc.d/user/contents.d/msmtp b/php/7.4/fpm-nginx/etc/s6-rc.d/user/contents.d/msmtp deleted file mode 100644 index e69de29..0000000 diff --git a/php/7.4/fpm-nginx/etc/s6-rc.d/user/contents.d/nginx b/php/7.4/fpm-nginx/etc/s6-rc.d/user/contents.d/nginx deleted file mode 100644 index e69de29..0000000 diff --git a/php/7.4/fpm-nginx/etc/s6-rc.d/user/contents.d/php-fpm-running b/php/7.4/fpm-nginx/etc/s6-rc.d/user/contents.d/php-fpm-running deleted file mode 100644 index e69de29..0000000 diff --git a/php/7.4/fpm-nginx/etc/scripts/msmtp-configure b/php/7.4/fpm-nginx/etc/scripts/msmtp-configure deleted file mode 100644 index fec7a24..0000000 --- a/php/7.4/fpm-nginx/etc/scripts/msmtp-configure +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/with-contenv ash - -# Configure PHP to use MSMTP -sed -i -r 's|;sendmail_path =*|sendmail_path = "/usr/bin/msmtp -t"|g' /etc/php8/php.ini - -# Configure MSMTP -sed -i -r "s/^host .*$/host ${MSMTP_RELAY_SERVER_HOST:-"mailhog"}/g" /etc/msmtprc -sed -i -r "s/^port .*$/port ${MSMTP_RELAY_SERVER_PORT:-"1025"}/g" /etc/msmtprc -sed -i -r "s/^auth .*$/auth ${MSMTP_RELAY_SERVER_AUTH:-"on"}/g" /etc/msmtprc -sed -i -r "s/^user .*$/user ${MSMTP_RELAY_SERVER_USER}/g" /etc/msmtprc -sed -i -r "s/^password .*$/password ${MSMTP_RELAY_SERVER_PASSWORD}/g" /etc/msmtprc -sed -i -r "s/^from .*$/from ${MSMTP_RELAY_SERVER_FROM}/g" /etc/msmtprc \ No newline at end of file diff --git a/php/7.4/fpm-nginx/etc/scripts/php-fpm-running b/php/7.4/fpm-nginx/etc/scripts/php-fpm-running deleted file mode 100644 index 4e25a71..0000000 --- a/php/7.4/fpm-nginx/etc/scripts/php-fpm-running +++ /dev/null @@ -1,10 +0,0 @@ -#!/command/execlineb -P - -# Exit immediately if a command exits with a non-zero status -set -e - -# Wait until PHP-FPM is running on port 9000 -while ! netstat -tna | grep 'LISTEN\>' | grep -q ':9000\>'; do sleep 0.1; done - -# Exit -exit 0; \ No newline at end of file diff --git a/php/7.4/fpm/Dockerfile b/php/7.4/fpm/Dockerfile deleted file mode 100644 index cb17c5b..0000000 --- a/php/7.4/fpm/Dockerfile +++ /dev/null @@ -1,64 +0,0 @@ -FROM ghcr.io/aliasproject/docker-baseimage-s6-overlay-alpine:3.15.0 - -LABEL maintainer="Michael Aguiar " - -# Set default PHP environment variables -ENV PHP_DATE_TIMEZONE="UTC" \ - PHP_DISPLAY_ERRORS=On \ - PHP_ERROR_REPORTING="E_ALL & ~E_DEPRECATED & ~E_STRICT" \ - PHP_MEMORY_LIMIT="256M" \ - PHP_MAX_EXECUTION_TIME="99" \ - PHP_POST_MAX_SIZE="100M" \ - PHP_UPLOAD_MAX_FILE_SIZE="100M" \ - PHP_POOL_NAME="www" \ - PHP_PM_CONTROL="dynamic" \ - PHP_PM_MAX_CHILDREN="20" \ - PHP_PM_START_SERVERS="2" \ - PHP_PM_MIN_SPARE_SERVERS="1" \ - PHP_PM_MAX_SPARE_SERVERS="3" - -# Install packages -RUN apk add --update --no-cache \ - curl \ - php7 \ - php7-fpm \ - php7-common \ - php7-curl \ - php7-gd \ - php7-exif \ - php7-pecl-imagick \ - php7-mbstring \ - php7-pdo_mysql \ - php7-mysqli \ - php7-opcache \ - php7-session \ - php7-simplexml \ - php7-iconv \ - php7-dom \ - php7-bcmath \ - php7-openssl \ - php7-ctype \ - php7-xmlwriter \ - php7-fileinfo \ - php7-xml \ - php7-xmlreader \ - php7-json \ - php7-phar \ - php7-tokenizer \ - php7-zip && \ - sed -i -e 's/\[www\]/\[$\{PHP_POOL_NAME\}]/g' /etc/php7/php-fpm.d/www.conf && \ - mkdir /app && \ - addgroup -S alias && adduser -S alias -G alias && \ - chown -R alias.alias /app - -# Copy over S6 configurations -COPY etc/s6-rc.d/ /etc/s6-overlay/s6-rc.d - -# Configure PHP -COPY etc/php/php-fpm.d/y-override-php-defaults.conf /etc/php7/php-fpm.d/y-override-php-defaults.conf - -# Set the default work directory to our web user -WORKDIR /app - -# Run S6 -ENTRYPOINT ["/init"] diff --git a/php/7.4/fpm/etc/php/php-fpm.d/y-override-php-defaults.conf b/php/7.4/fpm/etc/php/php-fpm.d/y-override-php-defaults.conf deleted file mode 100644 index b094e77..0000000 --- a/php/7.4/fpm/etc/php/php-fpm.d/y-override-php-defaults.conf +++ /dev/null @@ -1,242 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Docker friendly settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; These settings are offered specifically to behave well in a containerized environment. - -[global] -; Override default pid file -pid = /run/php-fpm.pid - -; Avoid logs being sent to syslog -error_log = /proc/self/fd/2 - -; Set this to php default's max_execution_time to allow children to stop gracefully when fpm is commanded to stop -; This helps avoiding 502's -process_control_timeout = 30 - -; Do not daemonize (eg send process to the background) -daemonize = no - -[${PHP_POOL_NAME}] -; Access from webserver container is via network, not socket file -listen = [::]:9000 - -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -user = alias -group = alias - -; Redirect logs to stdout - FPM closes /dev/std* on startup -access.log = /proc/self/fd/1 -catch_workers_output = yes - -; Remove "pool www" decoration from log output -decorate_workers_output = no - -; Required to allow config-by-environment -clear_env = no - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Process Management Settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = ${PHP_PM_CONTROL} - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = ${PHP_PM_MAX_CHILDREN} - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: (min_spare_servers + max_spare_servers) / 2 -pm.start_servers = ${PHP_PM_START_SERVERS} - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = ${PHP_PM_MIN_SPARE_SERVERS} - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = ${PHP_PM_MAX_SPARE_SERVERS} - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Healthcheck settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. It shows the following informations: -; pool - the name of the pool; -; process manager - static, dynamic or ondemand; -; start time - the date and time FPM has started; -; start since - number of seconds since FPM has started; -; accepted conn - the number of request accepted by the pool; -; listen queue - the number of request in the queue of pending -; connections (see backlog in listen(2)); -; max listen queue - the maximum number of requests in the queue -; of pending connections since FPM has started; -; listen queue len - the size of the socket queue of pending connections; -; idle processes - the number of idle processes; -; active processes - the number of active processes; -; total processes - the number of idle + active processes; -; max active processes - the maximum number of active processes since FPM -; has started; -; max children reached - number of times, the process limit has been reached, -; when pm tries to start more children (works only for -; pm 'dynamic' and 'ondemand'); -; Value are updated in real time. -; Example output: -; pool: www -; process manager: static -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 62636 -; accepted conn: 190460 -; listen queue: 0 -; max listen queue: 1 -; listen queue len: 42 -; idle processes: 4 -; active processes: 11 -; total processes: 15 -; max active processes: 12 -; max children reached: 0 -; -; By default the status page output is formatted as text/plain. Passing either -; 'html', 'xml' or 'json' in the query string will return the corresponding -; output syntax. Example: -; http://www.foo.bar/status -; http://www.foo.bar/status?json -; http://www.foo.bar/status?html -; http://www.foo.bar/status?xml -; -; By default the status page only outputs short status. Passing 'full' in the -; query string will also return status for each pool process. -; Example: -; http://www.foo.bar/status?full -; http://www.foo.bar/status?json&full -; http://www.foo.bar/status?html&full -; http://www.foo.bar/status?xml&full -; The Full status returns for each process: -; pid - the PID of the process; -; state - the state of the process (Idle, Running, ...); -; start time - the date and time the process has started; -; start since - the number of seconds since the process has started; -; requests - the number of requests the process has served; -; request duration - the duration in s of the requests; -; request method - the request method (GET, POST, ...); -; request URI - the request URI with the query string; -; content length - the content length of the request (only with POST); -; user - the user (PHP_AUTH_USER) (or '-' if not set); -; script - the main script called (or '-' if not set); -; last request cpu - the %cpu the last request consumed -; it's always 0 if the process is not in Idle state -; because CPU calculation is done when the request -; processing has terminated; -; last request memory - the max amount of memory the last request consumed -; it's always 0 if the process is not in Idle state -; because memory calculation is done when the request -; processing has terminated; -; If the process is in Idle state, then informations are related to the -; last request the process has served. Otherwise informations are related to -; the current request being served. -; Example output: -; ************************ -; pid: 31330 -; state: Running -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 63087 -; requests: 12808 -; request duration: 1250261 -; request method: GET -; request URI: /test_mem.php?N=10000 -; content length: 0 -; user: - -; script: /home/fat/web/docs/php/test_mem.php -; last request cpu: 0.00 -; last request memory: 0 -; -; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: /usr/share/php/8.0/fpm/status.html -; -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -;pm.status_path = /status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -ping.path = /ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Server Side Up Opinionated Settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; We believe everything should be secure by default. Some of these settings -; can be changed with environment variables. - - -; Security measures -;php_admin_value[open_basedir] = ${WEBUSER_HOME}:/dev/stdout:/tmp -;php_admin_flag[session.cookie_secure] = true - -; Regional settings -php_value[date.timezone] = ${PHP_DATE_TIMEZONE} - -; Error reporting settings -php_admin_value[display_errors] = ${PHP_DISPLAY_ERRORS} -php_admin_value[error_reporting] = ${PHP_ERROR_REPORTING} - -; Performance settings -php_admin_value[memory_limit] = ${PHP_MEMORY_LIMIT} -php_admin_value[max_execution_time] = ${PHP_MAX_EXECUTION_TIME} - -; Upload settings -php_admin_value[post_max_size] = ${PHP_POST_MAX_SIZE} -php_admin_value[upload_max_filesize] = ${PHP_UPLOAD_MAX_FILE_SIZE} diff --git a/php/7.4/fpm/etc/s6-rc.d/php-fpm/run b/php/7.4/fpm/etc/s6-rc.d/php-fpm/run deleted file mode 100644 index c24fd16..0000000 --- a/php/7.4/fpm/etc/s6-rc.d/php-fpm/run +++ /dev/null @@ -1,4 +0,0 @@ -#!/command/with-contenv ash - -# Start PHP-FPM -/usr/sbin/php-fpm7 --nodaemonize \ No newline at end of file diff --git a/php/7.4/fpm/etc/s6-rc.d/php-fpm/type b/php/7.4/fpm/etc/s6-rc.d/php-fpm/type deleted file mode 100644 index 1780f9f..0000000 --- a/php/7.4/fpm/etc/s6-rc.d/php-fpm/type +++ /dev/null @@ -1 +0,0 @@ -longrun \ No newline at end of file diff --git a/php/7.4/fpm/etc/s6-rc.d/user/contents.d/php-fpm b/php/7.4/fpm/etc/s6-rc.d/user/contents.d/php-fpm deleted file mode 100644 index e69de29..0000000 diff --git a/php/8.0/fpm-nginx/.DS_Store b/php/8.0/fpm-nginx/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0' | grep -q ':9000\>'; do sleep 0.1; done - -# Exit -exit 0; \ No newline at end of file diff --git a/php/8.0/fpm/alpine/Dockerfile b/php/8.0/fpm/alpine/Dockerfile deleted file mode 100644 index 52efb9c..0000000 --- a/php/8.0/fpm/alpine/Dockerfile +++ /dev/null @@ -1,66 +0,0 @@ -FROM ghcr.io/aliasproject/docker-baseimage-s6-overlay-alpine:3.15.0 - -LABEL maintainer="Michael Aguiar " - -# Set default PHP environment variables -ENV PHP_DATE_TIMEZONE="UTC" \ - PHP_DISPLAY_ERRORS=On \ - PHP_ERROR_REPORTING="E_ALL & ~E_DEPRECATED & ~E_STRICT" \ - PHP_MEMORY_LIMIT="256M" \ - PHP_MAX_EXECUTION_TIME="99" \ - PHP_POST_MAX_SIZE="100M" \ - PHP_UPLOAD_MAX_FILE_SIZE="100M" \ - PHP_POOL_NAME="www" \ - PHP_PM_CONTROL="dynamic" \ - PHP_PM_MAX_CHILDREN="20" \ - PHP_PM_START_SERVERS="2" \ - PHP_PM_MIN_SPARE_SERVERS="1" \ - PHP_PM_MAX_SPARE_SERVERS="3" - -# Install packages -RUN apk add --update --no-cache \ - curl \ - php8 \ - php8-fpm \ - php8-common \ - php8-curl \ - php8-gd \ - php8-exif \ - php8-pecl-imagick \ - php8-mbstring \ - php8-pdo_mysql \ - php8-mysqli \ - php8-session \ - php8-opcache \ - php8-xml \ - php8-xmlreader \ - php8-openssl \ - php8-bcmath \ - php8-ctype \ - php8-simplexml \ - php8-iconv \ - php8-dom \ - php8-json \ - php8-phar \ - php8-xmlwriter \ - php8-fileinfo \ - php8-tokenizer \ - php8-zip && \ - ln -s /usr/bin/php8 /usr/bin/php && \ - sed -i -e 's/\[www\]/\[$\{PHP_POOL_NAME\}]/g' /etc/php8/php-fpm.d/www.conf && \ - mkdir /app && \ - addgroup -S alias && \ - adduser -S alias -G alias && \ - chown -R alias.alias /app - -# Copy over S6 configurations -COPY etc/s6-rc.d/ /etc/s6-overlay/s6-rc.d - -# Configure PHP -COPY etc/php/php-fpm.d/y-override-php-defaults.conf /etc/php8/php-fpm.d/y-override-php-defaults.conf - -# Set the default work directory to our web user -WORKDIR /app - -# Run S6 -ENTRYPOINT ["/init"] \ No newline at end of file diff --git a/php/8.0/fpm/alpine/etc/php/php-fpm.d/y-override-php-defaults.conf b/php/8.0/fpm/alpine/etc/php/php-fpm.d/y-override-php-defaults.conf deleted file mode 100644 index b094e77..0000000 --- a/php/8.0/fpm/alpine/etc/php/php-fpm.d/y-override-php-defaults.conf +++ /dev/null @@ -1,242 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Docker friendly settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; These settings are offered specifically to behave well in a containerized environment. - -[global] -; Override default pid file -pid = /run/php-fpm.pid - -; Avoid logs being sent to syslog -error_log = /proc/self/fd/2 - -; Set this to php default's max_execution_time to allow children to stop gracefully when fpm is commanded to stop -; This helps avoiding 502's -process_control_timeout = 30 - -; Do not daemonize (eg send process to the background) -daemonize = no - -[${PHP_POOL_NAME}] -; Access from webserver container is via network, not socket file -listen = [::]:9000 - -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -user = alias -group = alias - -; Redirect logs to stdout - FPM closes /dev/std* on startup -access.log = /proc/self/fd/1 -catch_workers_output = yes - -; Remove "pool www" decoration from log output -decorate_workers_output = no - -; Required to allow config-by-environment -clear_env = no - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Process Management Settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = ${PHP_PM_CONTROL} - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = ${PHP_PM_MAX_CHILDREN} - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: (min_spare_servers + max_spare_servers) / 2 -pm.start_servers = ${PHP_PM_START_SERVERS} - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = ${PHP_PM_MIN_SPARE_SERVERS} - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = ${PHP_PM_MAX_SPARE_SERVERS} - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Healthcheck settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. It shows the following informations: -; pool - the name of the pool; -; process manager - static, dynamic or ondemand; -; start time - the date and time FPM has started; -; start since - number of seconds since FPM has started; -; accepted conn - the number of request accepted by the pool; -; listen queue - the number of request in the queue of pending -; connections (see backlog in listen(2)); -; max listen queue - the maximum number of requests in the queue -; of pending connections since FPM has started; -; listen queue len - the size of the socket queue of pending connections; -; idle processes - the number of idle processes; -; active processes - the number of active processes; -; total processes - the number of idle + active processes; -; max active processes - the maximum number of active processes since FPM -; has started; -; max children reached - number of times, the process limit has been reached, -; when pm tries to start more children (works only for -; pm 'dynamic' and 'ondemand'); -; Value are updated in real time. -; Example output: -; pool: www -; process manager: static -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 62636 -; accepted conn: 190460 -; listen queue: 0 -; max listen queue: 1 -; listen queue len: 42 -; idle processes: 4 -; active processes: 11 -; total processes: 15 -; max active processes: 12 -; max children reached: 0 -; -; By default the status page output is formatted as text/plain. Passing either -; 'html', 'xml' or 'json' in the query string will return the corresponding -; output syntax. Example: -; http://www.foo.bar/status -; http://www.foo.bar/status?json -; http://www.foo.bar/status?html -; http://www.foo.bar/status?xml -; -; By default the status page only outputs short status. Passing 'full' in the -; query string will also return status for each pool process. -; Example: -; http://www.foo.bar/status?full -; http://www.foo.bar/status?json&full -; http://www.foo.bar/status?html&full -; http://www.foo.bar/status?xml&full -; The Full status returns for each process: -; pid - the PID of the process; -; state - the state of the process (Idle, Running, ...); -; start time - the date and time the process has started; -; start since - the number of seconds since the process has started; -; requests - the number of requests the process has served; -; request duration - the duration in s of the requests; -; request method - the request method (GET, POST, ...); -; request URI - the request URI with the query string; -; content length - the content length of the request (only with POST); -; user - the user (PHP_AUTH_USER) (or '-' if not set); -; script - the main script called (or '-' if not set); -; last request cpu - the %cpu the last request consumed -; it's always 0 if the process is not in Idle state -; because CPU calculation is done when the request -; processing has terminated; -; last request memory - the max amount of memory the last request consumed -; it's always 0 if the process is not in Idle state -; because memory calculation is done when the request -; processing has terminated; -; If the process is in Idle state, then informations are related to the -; last request the process has served. Otherwise informations are related to -; the current request being served. -; Example output: -; ************************ -; pid: 31330 -; state: Running -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 63087 -; requests: 12808 -; request duration: 1250261 -; request method: GET -; request URI: /test_mem.php?N=10000 -; content length: 0 -; user: - -; script: /home/fat/web/docs/php/test_mem.php -; last request cpu: 0.00 -; last request memory: 0 -; -; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: /usr/share/php/8.0/fpm/status.html -; -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -;pm.status_path = /status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -ping.path = /ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Server Side Up Opinionated Settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; We believe everything should be secure by default. Some of these settings -; can be changed with environment variables. - - -; Security measures -;php_admin_value[open_basedir] = ${WEBUSER_HOME}:/dev/stdout:/tmp -;php_admin_flag[session.cookie_secure] = true - -; Regional settings -php_value[date.timezone] = ${PHP_DATE_TIMEZONE} - -; Error reporting settings -php_admin_value[display_errors] = ${PHP_DISPLAY_ERRORS} -php_admin_value[error_reporting] = ${PHP_ERROR_REPORTING} - -; Performance settings -php_admin_value[memory_limit] = ${PHP_MEMORY_LIMIT} -php_admin_value[max_execution_time] = ${PHP_MAX_EXECUTION_TIME} - -; Upload settings -php_admin_value[post_max_size] = ${PHP_POST_MAX_SIZE} -php_admin_value[upload_max_filesize] = ${PHP_UPLOAD_MAX_FILE_SIZE} diff --git a/php/8.0/fpm/alpine/etc/s6-rc.d/php-fpm/run b/php/8.0/fpm/alpine/etc/s6-rc.d/php-fpm/run deleted file mode 100644 index 6bce975..0000000 --- a/php/8.0/fpm/alpine/etc/s6-rc.d/php-fpm/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/command/with-contenv ash - -# Start PHP-FPM -/usr/sbin/php-fpm8 --nodaemonize - diff --git a/php/8.0/fpm/alpine/etc/s6-rc.d/php-fpm/type b/php/8.0/fpm/alpine/etc/s6-rc.d/php-fpm/type deleted file mode 100644 index 1780f9f..0000000 --- a/php/8.0/fpm/alpine/etc/s6-rc.d/php-fpm/type +++ /dev/null @@ -1 +0,0 @@ -longrun \ No newline at end of file diff --git a/php/8.0/fpm/alpine/etc/s6-rc.d/user/contents.d/php-fpm b/php/8.0/fpm/alpine/etc/s6-rc.d/user/contents.d/php-fpm deleted file mode 100644 index e69de29..0000000 diff --git a/php/8.0/fpm/ubuntu/Dockerfile b/php/8.0/fpm/ubuntu/Dockerfile deleted file mode 100644 index 4c78cb0..0000000 --- a/php/8.0/fpm/ubuntu/Dockerfile +++ /dev/null @@ -1,64 +0,0 @@ -FROM ghcr.io/aliasproject/docker-baseimage-s6-overlay-ubuntu:20.04 - -LABEL maintainer="Michael Aguiar " - -# Set default PHP environment variables -ENV PHP_DATE_TIMEZONE="UTC" \ - PHP_DISPLAY_ERRORS=On \ - PHP_ERROR_REPORTING="E_ALL & ~E_DEPRECATED & ~E_STRICT" \ - PHP_MEMORY_LIMIT="256M" \ - PHP_MAX_EXECUTION_TIME="99" \ - PHP_POST_MAX_SIZE="100M" \ - PHP_UPLOAD_MAX_FILE_SIZE="100M" \ - PHP_POOL_NAME="www" \ - PHP_PM_CONTROL="dynamic" \ - PHP_PM_MAX_CHILDREN="20" \ - PHP_PM_START_SERVERS="2" \ - PHP_PM_MIN_SPARE_SERVERS="1" \ - PHP_PM_MAX_SPARE_SERVERS="3" - -# Install packages -RUN export DEBIAN_FRONTEND=noninteractive && apt-get -y install software-properties-common && \ - add-apt-repository ppa:ondrej/php && \ - apt-get update && \ - apt-get -y install \ - curl \ - php8.0 \ - php8.0-fpm \ - php8.0-common \ - php8.0-curl \ - php8.0-gd \ - php8.0-exif \ - php8.0-mbstring \ - php8.0-mysql \ - php8.0-mysqli \ - php8.0-opcache \ - php8.0-xml \ - php8.0-xmlreader \ - php8.0-bcmath \ - php8.0-ctype \ - php8.0-simplexml \ - php8.0-iconv \ - php8.0-dom \ - php8.0-phar \ - php8.0-xmlwriter \ - php8.0-fileinfo \ - php8.0-tokenizer \ - php8.0-zip && \ - sed -i -e 's/\[www\]/\[$\{PHP_POOL_NAME\}]/g' /etc/php/8.0/fpm/pool.d/www.conf && \ - mkdir /app && \ - groupadd alias && \ - useradd alias -g alias && \ - chown -R alias.alias /app - -# Copy over S6 configurations -COPY etc/s6-rc.d/ /etc/s6-overlay/s6-rc.d - -# Configure PHP -COPY etc/php/php-fpm.d/y-override-php-defaults.conf /etc/php/8.0/fpm/pool.d/y-override-php-defaults.conf - -# Set the default work directory to our web user -WORKDIR /app - -# Run S6 -ENTRYPOINT ["/init"] \ No newline at end of file diff --git a/php/8.0/fpm/ubuntu/etc/php/php-fpm.d/y-override-php-defaults.conf b/php/8.0/fpm/ubuntu/etc/php/php-fpm.d/y-override-php-defaults.conf deleted file mode 100644 index b094e77..0000000 --- a/php/8.0/fpm/ubuntu/etc/php/php-fpm.d/y-override-php-defaults.conf +++ /dev/null @@ -1,242 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Docker friendly settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; These settings are offered specifically to behave well in a containerized environment. - -[global] -; Override default pid file -pid = /run/php-fpm.pid - -; Avoid logs being sent to syslog -error_log = /proc/self/fd/2 - -; Set this to php default's max_execution_time to allow children to stop gracefully when fpm is commanded to stop -; This helps avoiding 502's -process_control_timeout = 30 - -; Do not daemonize (eg send process to the background) -daemonize = no - -[${PHP_POOL_NAME}] -; Access from webserver container is via network, not socket file -listen = [::]:9000 - -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -user = alias -group = alias - -; Redirect logs to stdout - FPM closes /dev/std* on startup -access.log = /proc/self/fd/1 -catch_workers_output = yes - -; Remove "pool www" decoration from log output -decorate_workers_output = no - -; Required to allow config-by-environment -clear_env = no - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Process Management Settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = ${PHP_PM_CONTROL} - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = ${PHP_PM_MAX_CHILDREN} - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: (min_spare_servers + max_spare_servers) / 2 -pm.start_servers = ${PHP_PM_START_SERVERS} - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = ${PHP_PM_MIN_SPARE_SERVERS} - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = ${PHP_PM_MAX_SPARE_SERVERS} - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Healthcheck settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. It shows the following informations: -; pool - the name of the pool; -; process manager - static, dynamic or ondemand; -; start time - the date and time FPM has started; -; start since - number of seconds since FPM has started; -; accepted conn - the number of request accepted by the pool; -; listen queue - the number of request in the queue of pending -; connections (see backlog in listen(2)); -; max listen queue - the maximum number of requests in the queue -; of pending connections since FPM has started; -; listen queue len - the size of the socket queue of pending connections; -; idle processes - the number of idle processes; -; active processes - the number of active processes; -; total processes - the number of idle + active processes; -; max active processes - the maximum number of active processes since FPM -; has started; -; max children reached - number of times, the process limit has been reached, -; when pm tries to start more children (works only for -; pm 'dynamic' and 'ondemand'); -; Value are updated in real time. -; Example output: -; pool: www -; process manager: static -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 62636 -; accepted conn: 190460 -; listen queue: 0 -; max listen queue: 1 -; listen queue len: 42 -; idle processes: 4 -; active processes: 11 -; total processes: 15 -; max active processes: 12 -; max children reached: 0 -; -; By default the status page output is formatted as text/plain. Passing either -; 'html', 'xml' or 'json' in the query string will return the corresponding -; output syntax. Example: -; http://www.foo.bar/status -; http://www.foo.bar/status?json -; http://www.foo.bar/status?html -; http://www.foo.bar/status?xml -; -; By default the status page only outputs short status. Passing 'full' in the -; query string will also return status for each pool process. -; Example: -; http://www.foo.bar/status?full -; http://www.foo.bar/status?json&full -; http://www.foo.bar/status?html&full -; http://www.foo.bar/status?xml&full -; The Full status returns for each process: -; pid - the PID of the process; -; state - the state of the process (Idle, Running, ...); -; start time - the date and time the process has started; -; start since - the number of seconds since the process has started; -; requests - the number of requests the process has served; -; request duration - the duration in s of the requests; -; request method - the request method (GET, POST, ...); -; request URI - the request URI with the query string; -; content length - the content length of the request (only with POST); -; user - the user (PHP_AUTH_USER) (or '-' if not set); -; script - the main script called (or '-' if not set); -; last request cpu - the %cpu the last request consumed -; it's always 0 if the process is not in Idle state -; because CPU calculation is done when the request -; processing has terminated; -; last request memory - the max amount of memory the last request consumed -; it's always 0 if the process is not in Idle state -; because memory calculation is done when the request -; processing has terminated; -; If the process is in Idle state, then informations are related to the -; last request the process has served. Otherwise informations are related to -; the current request being served. -; Example output: -; ************************ -; pid: 31330 -; state: Running -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 63087 -; requests: 12808 -; request duration: 1250261 -; request method: GET -; request URI: /test_mem.php?N=10000 -; content length: 0 -; user: - -; script: /home/fat/web/docs/php/test_mem.php -; last request cpu: 0.00 -; last request memory: 0 -; -; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: /usr/share/php/8.0/fpm/status.html -; -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -;pm.status_path = /status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -ping.path = /ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Server Side Up Opinionated Settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; We believe everything should be secure by default. Some of these settings -; can be changed with environment variables. - - -; Security measures -;php_admin_value[open_basedir] = ${WEBUSER_HOME}:/dev/stdout:/tmp -;php_admin_flag[session.cookie_secure] = true - -; Regional settings -php_value[date.timezone] = ${PHP_DATE_TIMEZONE} - -; Error reporting settings -php_admin_value[display_errors] = ${PHP_DISPLAY_ERRORS} -php_admin_value[error_reporting] = ${PHP_ERROR_REPORTING} - -; Performance settings -php_admin_value[memory_limit] = ${PHP_MEMORY_LIMIT} -php_admin_value[max_execution_time] = ${PHP_MAX_EXECUTION_TIME} - -; Upload settings -php_admin_value[post_max_size] = ${PHP_POST_MAX_SIZE} -php_admin_value[upload_max_filesize] = ${PHP_UPLOAD_MAX_FILE_SIZE} diff --git a/php/8.0/fpm/ubuntu/etc/s6-rc.d/php-fpm/run b/php/8.0/fpm/ubuntu/etc/s6-rc.d/php-fpm/run deleted file mode 100644 index 0698a95..0000000 --- a/php/8.0/fpm/ubuntu/etc/s6-rc.d/php-fpm/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/command/with-contenv sh - -# Start PHP-FPM -/usr/sbin/php-fpm8.0 --nodaemonize - diff --git a/php/8.0/fpm/ubuntu/etc/s6-rc.d/php-fpm/type b/php/8.0/fpm/ubuntu/etc/s6-rc.d/php-fpm/type deleted file mode 100644 index 1780f9f..0000000 --- a/php/8.0/fpm/ubuntu/etc/s6-rc.d/php-fpm/type +++ /dev/null @@ -1 +0,0 @@ -longrun \ No newline at end of file diff --git a/php/8.0/fpm/ubuntu/etc/s6-rc.d/user/contents.d/php-fpm b/php/8.0/fpm/ubuntu/etc/s6-rc.d/user/contents.d/php-fpm deleted file mode 100644 index e69de29..0000000 diff --git a/php/8.1/fpm-nginx/Dockerfile b/php/8.1/fpm-nginx/Dockerfile deleted file mode 100644 index 399bc34..0000000 --- a/php/8.1/fpm-nginx/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM ghcr.io/aliasproject/php:8.1-fpm - -LABEL maintainer="Michael Aguiar " - -ENV HTTP2=true \ - PORT=80 \ - MSMTP_RELAY_SERVER_HOST= \ - MSMTP_RELAY_SERVER_PORT= \ - MSMTP_RELAY_SERVER_AUTH= \ - MSMTP_RELAY_SERVER_USER= \ - MSMTP_RELAY_SERVER_PASSWORD= \ - MSMTP_RELAY_SERVER_FROM= \ - PHP_POOL_NAME="www" \ - PHP_PM_CONTROL="ondemand" \ - PHP_PM_MAX_CHILDREN="20" \ - PHP_PM_START_SERVERS="2" \ - PHP_PM_MIN_SPARE_SERVERS="1" \ - PHP_PM_MAX_SPARE_SERVERS="3" - -# Copy over S6 configurations -COPY etc/s6-rc.d/ /etc/s6-overlay/s6-rc.d -COPY etc/scripts /etc/s6-overlay/scripts - -RUN apk add --update --no-cache nginx msmtp && \ - mkdir /var/run/php && \ - chmod u+x -R /etc/s6-overlay/scripts && \ - chown -R alias.alias /var/lib/nginx && \ - chown -R alias.alias /var/log/nginx - -# Configure NGINX -COPY etc/nginx/nginx.conf /etc/nginx/nginx.conf -COPY etc/nginx/php_fastcgi.conf /etc/nginx/php_fastcgi.conf -COPY etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf -COPY etc/nginx/server-opts.d /etc/nginx/server-opts.d - -# Configure MSMTP -COPY etc/msmtprc /etc/msmtprc - -# Configure PHP -COPY etc/php/php-fpm.d/z-fpm-with-overrides.conf /etc/php81/php-fpm.d/z-fpm-with-overrides.conf - -# Run S6 -ENTRYPOINT ["/init"] diff --git a/php/8.1/fpm-nginx/etc/msmtprc b/php/8.1/fpm-nginx/etc/msmtprc deleted file mode 100644 index f7bfbfc..0000000 --- a/php/8.1/fpm-nginx/etc/msmtprc +++ /dev/null @@ -1,14 +0,0 @@ -defaults -tls on -tls_trust_file /etc/ssl/certs/ca-certificates.crt -logfile - - -account default_account -host ${MSMTP_RELAY_SERVER_HOST} -port ${MSMTP_RELAY_SERVER_PORT} -auth ${MSMTP_RELAY_SERVER_AUTH} -user ${MSMTP_RELAY_SERVER_USER} -password ${MSMTP_RELAY_SERVER_PASSWORD} -from ${MSMTP_RELAY_SERVER_FROM} - -account default : default_account diff --git a/php/8.1/fpm-nginx/etc/nginx/conf.d/default.conf b/php/8.1/fpm-nginx/etc/nginx/conf.d/default.conf deleted file mode 100644 index 6fbeee7..0000000 --- a/php/8.1/fpm-nginx/etc/nginx/conf.d/default.conf +++ /dev/null @@ -1,83 +0,0 @@ -# server { -# listen 80 default_server; -# listen [::]:80 default_server; -# -# server_name _; -# -# # Redirect all HTTP traffic to HTTPS -# return 301 https://$host$request_uri; -# } - -server { - listen 80 default_server; - listen [::]:80 default_server; - - server_name _; - set $base /app; - root $base/public; - - ## - # Set Headers - ## - - proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; - - ## - # Allowed index files - ## - - index index.html index.htm index.php ; - - charset utf-8; - - ## - # Set max upload to 2048M - ## - - client_max_body_size 2048M; - - ## - # Health check - ## - - location /ping { - access_log off; - - # set max 5 seconds for health check - fastcgi_read_timeout 5s; - - include fastcgi_params; - fastcgi_param SCRIPT_NAME /ping; - fastcgi_param SCRIPT_FILENAME /ping; - fastcgi_pass unix:/var/run/php/php-fpm.sock; - } - - ## - # PHP try_files - ## - - location / { - try_files $uri $uri/ /index.php?$query_string; - } - - # Redirect server error pages to the static page /50x.html - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /var/lib/nginx/html; - } - - ## - # Run PHP files with PHP-FPM - ## - - location ~ \.php$ { - fastcgi_pass 127.0.0.1:9000; - include /etc/nginx/php_fastcgi.conf; - } - - ## - # Additional Config - ## - - include /etc/nginx/server-opts.d/*.conf; -} diff --git a/php/8.1/fpm-nginx/etc/nginx/nginx.conf b/php/8.1/fpm-nginx/etc/nginx/nginx.conf deleted file mode 100644 index e390253..0000000 --- a/php/8.1/fpm-nginx/etc/nginx/nginx.conf +++ /dev/null @@ -1,69 +0,0 @@ -user alias alias; -worker_processes auto; -pid /run/nginx.pid; -daemon off; - -events { - worker_connections 768; -} - -http { - ## - # General Settings - ## - - charset utf-8; - sendfile on; - tcp_nopush on; - tcp_nodelay on; - keepalive_timeout 65; - types_hash_max_size 2048; - types_hash_bucket_size 64; - server_tokens off; - - ## - # Set Mime Types - ## - include mime.types; - default_type application/octet-stream; - - ## - # SSL Settings - ## - - ssl_session_timeout 1d; - ssl_session_cache shared:SSL:10m; - ssl_session_tickets off; - - # Diffie-Hellman parameter for DHE ciphersuites - ssl_dhparam /etc/nginx/dhparam.pem; - - # Mozilla Intermediate configuration - ssl_protocols TLSv1.2 TLSv1.3; - ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; - - # OCSP Stapling - ssl_stapling on; - ssl_stapling_verify on; - resolver 1.1.1.1 1.0.0.1 8.8.8.8 8.8.4.4 208.67.222.222 208.67.220.220 valid=60s; - resolver_timeout 2s; - - ## - # Logging Settings - ## - - access_log /dev/stdout; - error_log /dev/stderr; - - # Define custom log format to include response times - log_format main_timed '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for" ' - '$request_time $upstream_response_time $pipe $upstream_cache_status'; - - ## - # Virtual Host Configs - ## - - include /etc/nginx/conf.d/*.conf; -} diff --git a/php/8.1/fpm-nginx/etc/nginx/php_fastcgi.conf b/php/8.1/fpm-nginx/etc/nginx/php_fastcgi.conf deleted file mode 100644 index 25c2435..0000000 --- a/php/8.1/fpm-nginx/etc/nginx/php_fastcgi.conf +++ /dev/null @@ -1,21 +0,0 @@ -## -# PHP FastCGI Configurations -## - -# 404 -try_files $fastcgi_script_name =404; - -# default fastcgi_params -include fastcgi_params; - -# fastcgi settings -fastcgi_index index.php; -fastcgi_buffers 8 16k; -fastcgi_buffer_size 32k; -# fastcgi_busy_buffers_size 24k; -# fastcgi_buffering off; - -# fastcgi params -fastcgi_param DOCUMENT_ROOT $realpath_root; -fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; -fastcgi_param PHP_ADMIN_VALUE "open_basedir=$base/:/usr/lib/php/:/tmp/"; diff --git a/php/8.1/fpm-nginx/etc/nginx/server-opts.d/performance.conf b/php/8.1/fpm-nginx/etc/nginx/server-opts.d/performance.conf deleted file mode 100644 index c25d3c5..0000000 --- a/php/8.1/fpm-nginx/etc/nginx/server-opts.d/performance.conf +++ /dev/null @@ -1,53 +0,0 @@ -## -# Performance Settings -## - -# favicon.ico -location = /favicon.ico { - log_not_found off; - access_log off; -} - -# robots.txt -location = /robots.txt { - log_not_found off; - access_log off; -} - -# assets, media -location ~* \.(txt|xml|js)$ { - expires 1y; -} - -location ~* \.(css)$ { - expires 1y; -} - -location ~* \.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|woff2|svg)$ { - expires 1y; -} - -location ~* \.(jpg|jpeg|png|gif|swf|webp)$ { - expires 1y; -} - -# gzip -# gzip on; -# gzip_vary on; -# gzip_proxied any; -# gzip_comp_level 6; -# gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml; -# -# - - -# Gzip Settings -gzip on; -gzip_disable "msie6"; -gzip_vary on; -gzip_proxied any; -gzip_comp_level 6; -gzip_buffers 32 16k; -gzip_http_version 1.1; -gzip_min_length 250; -gzip_types image/jpeg image/bmp image/svg+xml text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon; diff --git a/php/8.1/fpm-nginx/etc/nginx/server-opts.d/security.conf b/php/8.1/fpm-nginx/etc/nginx/server-opts.d/security.conf deleted file mode 100644 index 04198f5..0000000 --- a/php/8.1/fpm-nginx/etc/nginx/server-opts.d/security.conf +++ /dev/null @@ -1,29 +0,0 @@ -## -# Security Headers -## - -# Prevent IFRAME spoofing attacks -add_header X-Frame-Options "SAMEORIGIN" always; - -# Configure X-XSS Protection -add_header X-XSS-Protection "1; mode=block" always; - -# Prevent MIME attacks -add_header X-Content-Type-Options "nosniff" always; - -# Prevent Referrer URL from being leaked -add_header Referrer-Policy "no-referrer-when-downgrade" always; - -# Configure Content Security Policy -#add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'; frame-ancestors 'self';" always; - -# Configure Permissions Policy -add_header Permissions-Policy "interest-cohort=()" always; - -# Enable HSTS -add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; - -# Prevent access to . files (excent the well-known directory) -location ~ /\.(?!well-known) { - deny all; -} diff --git a/php/8.1/fpm-nginx/etc/php/php-fpm.d/z-fpm-with-overrides.conf b/php/8.1/fpm-nginx/etc/php/php-fpm.d/z-fpm-with-overrides.conf deleted file mode 100644 index 28ed8b3..0000000 --- a/php/8.1/fpm-nginx/etc/php/php-fpm.d/z-fpm-with-overrides.conf +++ /dev/null @@ -1,8 +0,0 @@ -[${PHP_POOL_NAME}] - -; Access from webserver container is via network, not socket file -listen = [::]:9000 -listen.allowed_clients = 127.0.0.1 -listen.owner = alias -listen.group = alias -listen.mode = 0660 diff --git a/php/8.1/fpm-nginx/etc/s6-rc.d/msmtp/type b/php/8.1/fpm-nginx/etc/s6-rc.d/msmtp/type deleted file mode 100644 index 3d92b15..0000000 --- a/php/8.1/fpm-nginx/etc/s6-rc.d/msmtp/type +++ /dev/null @@ -1 +0,0 @@ -oneshot \ No newline at end of file diff --git a/php/8.1/fpm-nginx/etc/s6-rc.d/msmtp/up b/php/8.1/fpm-nginx/etc/s6-rc.d/msmtp/up deleted file mode 100644 index 63644c3..0000000 --- a/php/8.1/fpm-nginx/etc/s6-rc.d/msmtp/up +++ /dev/null @@ -1,2 +0,0 @@ -with-contenv -ash /etc/s6-overlay/scripts/msmtp-configure \ No newline at end of file diff --git a/php/8.1/fpm-nginx/etc/s6-rc.d/nginx/dependencies b/php/8.1/fpm-nginx/etc/s6-rc.d/nginx/dependencies deleted file mode 100644 index 372227b..0000000 --- a/php/8.1/fpm-nginx/etc/s6-rc.d/nginx/dependencies +++ /dev/null @@ -1 +0,0 @@ -php-fpm-running \ No newline at end of file diff --git a/php/8.1/fpm-nginx/etc/s6-rc.d/nginx/run b/php/8.1/fpm-nginx/etc/s6-rc.d/nginx/run deleted file mode 100644 index 89fa058..0000000 --- a/php/8.1/fpm-nginx/etc/s6-rc.d/nginx/run +++ /dev/null @@ -1,25 +0,0 @@ -#!/command/with-contenv ash - -# Set Port for default -if [ $HTTP2 == "true" ] -then - sed -i -r "s/80 default_server;/${PORT} default_server http2;/g" /etc/nginx/conf.d/default.conf -else - sed -i -r "s/80 default_server;/${PORT} default_server;/g" /etc/nginx/conf.d/default.conf -fi - -# Set Port for any additional vhosts -for filename in /etc/nginx/conf.d/*; do - if [ "$filename" != "/etc/nginx/conf.d/default.conf" ] - then - if [ $HTTP2 == "true" ] - then - sed -i -r "s/80;/${PORT} http2;/g" $filename - else - sed -i -r "s/80;/${PORT};/g" $filename - fi - fi -done - -# Start NGINX -nginx \ No newline at end of file diff --git a/php/8.1/fpm-nginx/etc/s6-rc.d/nginx/type b/php/8.1/fpm-nginx/etc/s6-rc.d/nginx/type deleted file mode 100644 index 1780f9f..0000000 --- a/php/8.1/fpm-nginx/etc/s6-rc.d/nginx/type +++ /dev/null @@ -1 +0,0 @@ -longrun \ No newline at end of file diff --git a/php/8.1/fpm-nginx/etc/s6-rc.d/php-fpm-running/dependencies b/php/8.1/fpm-nginx/etc/s6-rc.d/php-fpm-running/dependencies deleted file mode 100644 index 54f9367..0000000 --- a/php/8.1/fpm-nginx/etc/s6-rc.d/php-fpm-running/dependencies +++ /dev/null @@ -1 +0,0 @@ -php-fpm \ No newline at end of file diff --git a/php/8.1/fpm-nginx/etc/s6-rc.d/php-fpm-running/type b/php/8.1/fpm-nginx/etc/s6-rc.d/php-fpm-running/type deleted file mode 100644 index 3d92b15..0000000 --- a/php/8.1/fpm-nginx/etc/s6-rc.d/php-fpm-running/type +++ /dev/null @@ -1 +0,0 @@ -oneshot \ No newline at end of file diff --git a/php/8.1/fpm-nginx/etc/s6-rc.d/php-fpm-running/up b/php/8.1/fpm-nginx/etc/s6-rc.d/php-fpm-running/up deleted file mode 100644 index 45bc2dc..0000000 --- a/php/8.1/fpm-nginx/etc/s6-rc.d/php-fpm-running/up +++ /dev/null @@ -1 +0,0 @@ -ash /etc/s6-overlay/scripts/php-fpm-running \ No newline at end of file diff --git a/php/8.1/fpm-nginx/etc/s6-rc.d/user/contents.d/msmtp b/php/8.1/fpm-nginx/etc/s6-rc.d/user/contents.d/msmtp deleted file mode 100644 index e69de29..0000000 diff --git a/php/8.1/fpm-nginx/etc/s6-rc.d/user/contents.d/nginx b/php/8.1/fpm-nginx/etc/s6-rc.d/user/contents.d/nginx deleted file mode 100644 index e69de29..0000000 diff --git a/php/8.1/fpm-nginx/etc/s6-rc.d/user/contents.d/php-fpm-running b/php/8.1/fpm-nginx/etc/s6-rc.d/user/contents.d/php-fpm-running deleted file mode 100644 index e69de29..0000000 diff --git a/php/8.1/fpm-nginx/etc/scripts/msmtp-configure b/php/8.1/fpm-nginx/etc/scripts/msmtp-configure deleted file mode 100644 index 8c5848a..0000000 --- a/php/8.1/fpm-nginx/etc/scripts/msmtp-configure +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/with-contenv ash - -# Configure PHP to use MSMTP -sed -i -r 's|;sendmail_path =*|sendmail_path = "/usr/bin/msmtp -t"|g' /etc/php81/php.ini - -# Configure MSMTP -sed -i -r "s/^host .*$/host ${MSMTP_RELAY_SERVER_HOST:-"mailhog"}/g" /etc/msmtprc -sed -i -r "s/^port .*$/port ${MSMTP_RELAY_SERVER_PORT:-"1025"}/g" /etc/msmtprc -sed -i -r "s/^auth .*$/auth ${MSMTP_RELAY_SERVER_AUTH:-"on"}/g" /etc/msmtprc -sed -i -r "s/^user .*$/user ${MSMTP_RELAY_SERVER_USER}/g" /etc/msmtprc -sed -i -r "s/^password .*$/password ${MSMTP_RELAY_SERVER_PASSWORD}/g" /etc/msmtprc -sed -i -r "s/^from .*$/from ${MSMTP_RELAY_SERVER_FROM}/g" /etc/msmtprc \ No newline at end of file diff --git a/php/8.1/fpm-nginx/etc/scripts/php-fpm-running b/php/8.1/fpm-nginx/etc/scripts/php-fpm-running deleted file mode 100644 index 4e25a71..0000000 --- a/php/8.1/fpm-nginx/etc/scripts/php-fpm-running +++ /dev/null @@ -1,10 +0,0 @@ -#!/command/execlineb -P - -# Exit immediately if a command exits with a non-zero status -set -e - -# Wait until PHP-FPM is running on port 9000 -while ! netstat -tna | grep 'LISTEN\>' | grep -q ':9000\>'; do sleep 0.1; done - -# Exit -exit 0; \ No newline at end of file diff --git a/php/8.1/fpm/Dockerfile b/php/8.1/fpm/Dockerfile deleted file mode 100644 index a6fdf3c..0000000 --- a/php/8.1/fpm/Dockerfile +++ /dev/null @@ -1,66 +0,0 @@ -FROM ghcr.io/aliasproject/docker-baseimage-s6-overlay-alpine:3.16 - -LABEL maintainer="Michael Aguiar " - -# Set default PHP environment variables -ENV PHP_DATE_TIMEZONE="UTC" \ - PHP_DISPLAY_ERRORS=On \ - PHP_ERROR_REPORTING="E_ALL & ~E_DEPRECATED & ~E_STRICT" \ - PHP_MEMORY_LIMIT="256M" \ - PHP_MAX_EXECUTION_TIME="99" \ - PHP_POST_MAX_SIZE="100M" \ - PHP_UPLOAD_MAX_FILE_SIZE="100M" \ - PHP_POOL_NAME="www" \ - PHP_PM_CONTROL="dynamic" \ - PHP_PM_MAX_CHILDREN="20" \ - PHP_PM_START_SERVERS="2" \ - PHP_PM_MIN_SPARE_SERVERS="1" \ - PHP_PM_MAX_SPARE_SERVERS="3" - -# Install packages -RUN apk add --update --no-cache \ - curl \ - php81 \ - php81-fpm \ - php81-common \ - php81-curl \ - php81-gd \ - php81-exif \ - php81-pecl-imagick \ - php81-mbstring \ - php81-pdo_mysql \ - php81-mysqli \ - php81-session \ - php81-opcache \ - php81-xml \ - php81-xmlreader \ - php81-openssl \ - php81-bcmath \ - php81-ctype \ - php81-simplexml \ - php81-iconv \ - php81-dom \ - php81-json \ - php81-phar \ - php81-xmlwriter \ - php81-fileinfo \ - php81-tokenizer \ - php81-zip && \ - ln -s /usr/bin/php81 /usr/bin/php && \ - sed -i -e 's/\[www\]/\[$\{PHP_POOL_NAME\}]/g' /etc/php81/php-fpm.d/www.conf && \ - mkdir /app && \ - addgroup -S alias && \ - adduser -S alias -G alias && \ - chown -R alias.alias /app - -# Copy over S6 configurations -COPY etc/s6-rc.d/ /etc/s6-overlay/s6-rc.d - -# Configure PHP -COPY etc/php/php-fpm.d/y-override-php-defaults.conf /etc/php81/php-fpm.d/y-override-php-defaults.conf - -# Set the default work directory to our web user -WORKDIR /app - -# Run S6 -ENTRYPOINT ["/init"] \ No newline at end of file diff --git a/php/8.1/fpm/etc/php/php-fpm.d/y-override-php-defaults.conf b/php/8.1/fpm/etc/php/php-fpm.d/y-override-php-defaults.conf deleted file mode 100644 index b094e77..0000000 --- a/php/8.1/fpm/etc/php/php-fpm.d/y-override-php-defaults.conf +++ /dev/null @@ -1,242 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Docker friendly settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; These settings are offered specifically to behave well in a containerized environment. - -[global] -; Override default pid file -pid = /run/php-fpm.pid - -; Avoid logs being sent to syslog -error_log = /proc/self/fd/2 - -; Set this to php default's max_execution_time to allow children to stop gracefully when fpm is commanded to stop -; This helps avoiding 502's -process_control_timeout = 30 - -; Do not daemonize (eg send process to the background) -daemonize = no - -[${PHP_POOL_NAME}] -; Access from webserver container is via network, not socket file -listen = [::]:9000 - -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -user = alias -group = alias - -; Redirect logs to stdout - FPM closes /dev/std* on startup -access.log = /proc/self/fd/1 -catch_workers_output = yes - -; Remove "pool www" decoration from log output -decorate_workers_output = no - -; Required to allow config-by-environment -clear_env = no - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Process Management Settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = ${PHP_PM_CONTROL} - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = ${PHP_PM_MAX_CHILDREN} - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: (min_spare_servers + max_spare_servers) / 2 -pm.start_servers = ${PHP_PM_START_SERVERS} - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = ${PHP_PM_MIN_SPARE_SERVERS} - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = ${PHP_PM_MAX_SPARE_SERVERS} - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Healthcheck settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. It shows the following informations: -; pool - the name of the pool; -; process manager - static, dynamic or ondemand; -; start time - the date and time FPM has started; -; start since - number of seconds since FPM has started; -; accepted conn - the number of request accepted by the pool; -; listen queue - the number of request in the queue of pending -; connections (see backlog in listen(2)); -; max listen queue - the maximum number of requests in the queue -; of pending connections since FPM has started; -; listen queue len - the size of the socket queue of pending connections; -; idle processes - the number of idle processes; -; active processes - the number of active processes; -; total processes - the number of idle + active processes; -; max active processes - the maximum number of active processes since FPM -; has started; -; max children reached - number of times, the process limit has been reached, -; when pm tries to start more children (works only for -; pm 'dynamic' and 'ondemand'); -; Value are updated in real time. -; Example output: -; pool: www -; process manager: static -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 62636 -; accepted conn: 190460 -; listen queue: 0 -; max listen queue: 1 -; listen queue len: 42 -; idle processes: 4 -; active processes: 11 -; total processes: 15 -; max active processes: 12 -; max children reached: 0 -; -; By default the status page output is formatted as text/plain. Passing either -; 'html', 'xml' or 'json' in the query string will return the corresponding -; output syntax. Example: -; http://www.foo.bar/status -; http://www.foo.bar/status?json -; http://www.foo.bar/status?html -; http://www.foo.bar/status?xml -; -; By default the status page only outputs short status. Passing 'full' in the -; query string will also return status for each pool process. -; Example: -; http://www.foo.bar/status?full -; http://www.foo.bar/status?json&full -; http://www.foo.bar/status?html&full -; http://www.foo.bar/status?xml&full -; The Full status returns for each process: -; pid - the PID of the process; -; state - the state of the process (Idle, Running, ...); -; start time - the date and time the process has started; -; start since - the number of seconds since the process has started; -; requests - the number of requests the process has served; -; request duration - the duration in s of the requests; -; request method - the request method (GET, POST, ...); -; request URI - the request URI with the query string; -; content length - the content length of the request (only with POST); -; user - the user (PHP_AUTH_USER) (or '-' if not set); -; script - the main script called (or '-' if not set); -; last request cpu - the %cpu the last request consumed -; it's always 0 if the process is not in Idle state -; because CPU calculation is done when the request -; processing has terminated; -; last request memory - the max amount of memory the last request consumed -; it's always 0 if the process is not in Idle state -; because memory calculation is done when the request -; processing has terminated; -; If the process is in Idle state, then informations are related to the -; last request the process has served. Otherwise informations are related to -; the current request being served. -; Example output: -; ************************ -; pid: 31330 -; state: Running -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 63087 -; requests: 12808 -; request duration: 1250261 -; request method: GET -; request URI: /test_mem.php?N=10000 -; content length: 0 -; user: - -; script: /home/fat/web/docs/php/test_mem.php -; last request cpu: 0.00 -; last request memory: 0 -; -; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: /usr/share/php/8.0/fpm/status.html -; -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -;pm.status_path = /status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -ping.path = /ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Server Side Up Opinionated Settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; We believe everything should be secure by default. Some of these settings -; can be changed with environment variables. - - -; Security measures -;php_admin_value[open_basedir] = ${WEBUSER_HOME}:/dev/stdout:/tmp -;php_admin_flag[session.cookie_secure] = true - -; Regional settings -php_value[date.timezone] = ${PHP_DATE_TIMEZONE} - -; Error reporting settings -php_admin_value[display_errors] = ${PHP_DISPLAY_ERRORS} -php_admin_value[error_reporting] = ${PHP_ERROR_REPORTING} - -; Performance settings -php_admin_value[memory_limit] = ${PHP_MEMORY_LIMIT} -php_admin_value[max_execution_time] = ${PHP_MAX_EXECUTION_TIME} - -; Upload settings -php_admin_value[post_max_size] = ${PHP_POST_MAX_SIZE} -php_admin_value[upload_max_filesize] = ${PHP_UPLOAD_MAX_FILE_SIZE} diff --git a/php/8.1/fpm/etc/s6-rc.d/php-fpm/run b/php/8.1/fpm/etc/s6-rc.d/php-fpm/run deleted file mode 100644 index f49fc6f..0000000 --- a/php/8.1/fpm/etc/s6-rc.d/php-fpm/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/command/with-contenv ash - -# Start PHP-FPM -/usr/sbin/php-fpm81 --nodaemonize - diff --git a/php/8.1/fpm/etc/s6-rc.d/php-fpm/type b/php/8.1/fpm/etc/s6-rc.d/php-fpm/type deleted file mode 100644 index 1780f9f..0000000 --- a/php/8.1/fpm/etc/s6-rc.d/php-fpm/type +++ /dev/null @@ -1 +0,0 @@ -longrun \ No newline at end of file diff --git a/php/8.1/fpm/etc/s6-rc.d/user/contents.d/php-fpm b/php/8.1/fpm/etc/s6-rc.d/user/contents.d/php-fpm deleted file mode 100644 index e69de29..0000000 diff --git a/php/8.2/fpm-nginx/Dockerfile b/php/8.2/fpm-nginx/Dockerfile deleted file mode 100644 index 5b7262c..0000000 --- a/php/8.2/fpm-nginx/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM ghcr.io/aliasproject/php:8.2-fpm - -LABEL maintainer="Michael Aguiar " - -ENV HTTP2=true \ - PORT=80 \ - MSMTP_RELAY_SERVER_HOST= \ - MSMTP_RELAY_SERVER_PORT= \ - MSMTP_RELAY_SERVER_AUTH= \ - MSMTP_RELAY_SERVER_USER= \ - MSMTP_RELAY_SERVER_PASSWORD= \ - MSMTP_RELAY_SERVER_FROM= \ - PHP_POOL_NAME="www" \ - PHP_PM_CONTROL="ondemand" \ - PHP_PM_MAX_CHILDREN="20" \ - PHP_PM_START_SERVERS="2" \ - PHP_PM_MIN_SPARE_SERVERS="1" \ - PHP_PM_MAX_SPARE_SERVERS="3" - -# Copy over S6 configurations -COPY etc/s6-rc.d/ /etc/s6-overlay/s6-rc.d -COPY etc/scripts /etc/s6-overlay/scripts - -RUN apk add --update --no-cache nginx msmtp && \ - mkdir /var/run/php && \ - chmod u+x -R /etc/s6-overlay/scripts && \ - chown -R alias.alias /var/lib/nginx && \ - chown -R alias.alias /var/log/nginx - -# Configure NGINX -COPY etc/nginx/nginx.conf /etc/nginx/nginx.conf -COPY etc/nginx/php_fastcgi.conf /etc/nginx/php_fastcgi.conf -COPY etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf -COPY etc/nginx/server-opts.d /etc/nginx/server-opts.d - -# Configure MSMTP -COPY etc/msmtprc /etc/msmtprc - -# Configure PHP -COPY etc/php/php-fpm.d/z-fpm-with-overrides.conf /etc/php81/php-fpm.d/z-fpm-with-overrides.conf - -# Run S6 -ENTRYPOINT ["/init"] diff --git a/php/8.2/fpm-nginx/etc/msmtprc b/php/8.2/fpm-nginx/etc/msmtprc deleted file mode 100644 index f7bfbfc..0000000 --- a/php/8.2/fpm-nginx/etc/msmtprc +++ /dev/null @@ -1,14 +0,0 @@ -defaults -tls on -tls_trust_file /etc/ssl/certs/ca-certificates.crt -logfile - - -account default_account -host ${MSMTP_RELAY_SERVER_HOST} -port ${MSMTP_RELAY_SERVER_PORT} -auth ${MSMTP_RELAY_SERVER_AUTH} -user ${MSMTP_RELAY_SERVER_USER} -password ${MSMTP_RELAY_SERVER_PASSWORD} -from ${MSMTP_RELAY_SERVER_FROM} - -account default : default_account diff --git a/php/8.2/fpm-nginx/etc/nginx/conf.d/default.conf b/php/8.2/fpm-nginx/etc/nginx/conf.d/default.conf deleted file mode 100644 index 6fbeee7..0000000 --- a/php/8.2/fpm-nginx/etc/nginx/conf.d/default.conf +++ /dev/null @@ -1,83 +0,0 @@ -# server { -# listen 80 default_server; -# listen [::]:80 default_server; -# -# server_name _; -# -# # Redirect all HTTP traffic to HTTPS -# return 301 https://$host$request_uri; -# } - -server { - listen 80 default_server; - listen [::]:80 default_server; - - server_name _; - set $base /app; - root $base/public; - - ## - # Set Headers - ## - - proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; - - ## - # Allowed index files - ## - - index index.html index.htm index.php ; - - charset utf-8; - - ## - # Set max upload to 2048M - ## - - client_max_body_size 2048M; - - ## - # Health check - ## - - location /ping { - access_log off; - - # set max 5 seconds for health check - fastcgi_read_timeout 5s; - - include fastcgi_params; - fastcgi_param SCRIPT_NAME /ping; - fastcgi_param SCRIPT_FILENAME /ping; - fastcgi_pass unix:/var/run/php/php-fpm.sock; - } - - ## - # PHP try_files - ## - - location / { - try_files $uri $uri/ /index.php?$query_string; - } - - # Redirect server error pages to the static page /50x.html - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /var/lib/nginx/html; - } - - ## - # Run PHP files with PHP-FPM - ## - - location ~ \.php$ { - fastcgi_pass 127.0.0.1:9000; - include /etc/nginx/php_fastcgi.conf; - } - - ## - # Additional Config - ## - - include /etc/nginx/server-opts.d/*.conf; -} diff --git a/php/8.2/fpm-nginx/etc/nginx/nginx.conf b/php/8.2/fpm-nginx/etc/nginx/nginx.conf deleted file mode 100644 index e390253..0000000 --- a/php/8.2/fpm-nginx/etc/nginx/nginx.conf +++ /dev/null @@ -1,69 +0,0 @@ -user alias alias; -worker_processes auto; -pid /run/nginx.pid; -daemon off; - -events { - worker_connections 768; -} - -http { - ## - # General Settings - ## - - charset utf-8; - sendfile on; - tcp_nopush on; - tcp_nodelay on; - keepalive_timeout 65; - types_hash_max_size 2048; - types_hash_bucket_size 64; - server_tokens off; - - ## - # Set Mime Types - ## - include mime.types; - default_type application/octet-stream; - - ## - # SSL Settings - ## - - ssl_session_timeout 1d; - ssl_session_cache shared:SSL:10m; - ssl_session_tickets off; - - # Diffie-Hellman parameter for DHE ciphersuites - ssl_dhparam /etc/nginx/dhparam.pem; - - # Mozilla Intermediate configuration - ssl_protocols TLSv1.2 TLSv1.3; - ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; - - # OCSP Stapling - ssl_stapling on; - ssl_stapling_verify on; - resolver 1.1.1.1 1.0.0.1 8.8.8.8 8.8.4.4 208.67.222.222 208.67.220.220 valid=60s; - resolver_timeout 2s; - - ## - # Logging Settings - ## - - access_log /dev/stdout; - error_log /dev/stderr; - - # Define custom log format to include response times - log_format main_timed '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for" ' - '$request_time $upstream_response_time $pipe $upstream_cache_status'; - - ## - # Virtual Host Configs - ## - - include /etc/nginx/conf.d/*.conf; -} diff --git a/php/8.2/fpm-nginx/etc/nginx/php_fastcgi.conf b/php/8.2/fpm-nginx/etc/nginx/php_fastcgi.conf deleted file mode 100644 index 25c2435..0000000 --- a/php/8.2/fpm-nginx/etc/nginx/php_fastcgi.conf +++ /dev/null @@ -1,21 +0,0 @@ -## -# PHP FastCGI Configurations -## - -# 404 -try_files $fastcgi_script_name =404; - -# default fastcgi_params -include fastcgi_params; - -# fastcgi settings -fastcgi_index index.php; -fastcgi_buffers 8 16k; -fastcgi_buffer_size 32k; -# fastcgi_busy_buffers_size 24k; -# fastcgi_buffering off; - -# fastcgi params -fastcgi_param DOCUMENT_ROOT $realpath_root; -fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; -fastcgi_param PHP_ADMIN_VALUE "open_basedir=$base/:/usr/lib/php/:/tmp/"; diff --git a/php/8.2/fpm-nginx/etc/nginx/server-opts.d/performance.conf b/php/8.2/fpm-nginx/etc/nginx/server-opts.d/performance.conf deleted file mode 100644 index c25d3c5..0000000 --- a/php/8.2/fpm-nginx/etc/nginx/server-opts.d/performance.conf +++ /dev/null @@ -1,53 +0,0 @@ -## -# Performance Settings -## - -# favicon.ico -location = /favicon.ico { - log_not_found off; - access_log off; -} - -# robots.txt -location = /robots.txt { - log_not_found off; - access_log off; -} - -# assets, media -location ~* \.(txt|xml|js)$ { - expires 1y; -} - -location ~* \.(css)$ { - expires 1y; -} - -location ~* \.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|woff2|svg)$ { - expires 1y; -} - -location ~* \.(jpg|jpeg|png|gif|swf|webp)$ { - expires 1y; -} - -# gzip -# gzip on; -# gzip_vary on; -# gzip_proxied any; -# gzip_comp_level 6; -# gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml; -# -# - - -# Gzip Settings -gzip on; -gzip_disable "msie6"; -gzip_vary on; -gzip_proxied any; -gzip_comp_level 6; -gzip_buffers 32 16k; -gzip_http_version 1.1; -gzip_min_length 250; -gzip_types image/jpeg image/bmp image/svg+xml text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon; diff --git a/php/8.2/fpm-nginx/etc/nginx/server-opts.d/security.conf b/php/8.2/fpm-nginx/etc/nginx/server-opts.d/security.conf deleted file mode 100644 index 04198f5..0000000 --- a/php/8.2/fpm-nginx/etc/nginx/server-opts.d/security.conf +++ /dev/null @@ -1,29 +0,0 @@ -## -# Security Headers -## - -# Prevent IFRAME spoofing attacks -add_header X-Frame-Options "SAMEORIGIN" always; - -# Configure X-XSS Protection -add_header X-XSS-Protection "1; mode=block" always; - -# Prevent MIME attacks -add_header X-Content-Type-Options "nosniff" always; - -# Prevent Referrer URL from being leaked -add_header Referrer-Policy "no-referrer-when-downgrade" always; - -# Configure Content Security Policy -#add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'; frame-ancestors 'self';" always; - -# Configure Permissions Policy -add_header Permissions-Policy "interest-cohort=()" always; - -# Enable HSTS -add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; - -# Prevent access to . files (excent the well-known directory) -location ~ /\.(?!well-known) { - deny all; -} diff --git a/php/8.2/fpm-nginx/etc/php/php-fpm.d/z-fpm-with-overrides.conf b/php/8.2/fpm-nginx/etc/php/php-fpm.d/z-fpm-with-overrides.conf deleted file mode 100644 index 28ed8b3..0000000 --- a/php/8.2/fpm-nginx/etc/php/php-fpm.d/z-fpm-with-overrides.conf +++ /dev/null @@ -1,8 +0,0 @@ -[${PHP_POOL_NAME}] - -; Access from webserver container is via network, not socket file -listen = [::]:9000 -listen.allowed_clients = 127.0.0.1 -listen.owner = alias -listen.group = alias -listen.mode = 0660 diff --git a/php/8.2/fpm-nginx/etc/s6-rc.d/msmtp/type b/php/8.2/fpm-nginx/etc/s6-rc.d/msmtp/type deleted file mode 100644 index 3d92b15..0000000 --- a/php/8.2/fpm-nginx/etc/s6-rc.d/msmtp/type +++ /dev/null @@ -1 +0,0 @@ -oneshot \ No newline at end of file diff --git a/php/8.2/fpm-nginx/etc/s6-rc.d/msmtp/up b/php/8.2/fpm-nginx/etc/s6-rc.d/msmtp/up deleted file mode 100644 index 63644c3..0000000 --- a/php/8.2/fpm-nginx/etc/s6-rc.d/msmtp/up +++ /dev/null @@ -1,2 +0,0 @@ -with-contenv -ash /etc/s6-overlay/scripts/msmtp-configure \ No newline at end of file diff --git a/php/8.2/fpm-nginx/etc/s6-rc.d/nginx/dependencies b/php/8.2/fpm-nginx/etc/s6-rc.d/nginx/dependencies deleted file mode 100644 index 372227b..0000000 --- a/php/8.2/fpm-nginx/etc/s6-rc.d/nginx/dependencies +++ /dev/null @@ -1 +0,0 @@ -php-fpm-running \ No newline at end of file diff --git a/php/8.2/fpm-nginx/etc/s6-rc.d/nginx/run b/php/8.2/fpm-nginx/etc/s6-rc.d/nginx/run deleted file mode 100644 index 89fa058..0000000 --- a/php/8.2/fpm-nginx/etc/s6-rc.d/nginx/run +++ /dev/null @@ -1,25 +0,0 @@ -#!/command/with-contenv ash - -# Set Port for default -if [ $HTTP2 == "true" ] -then - sed -i -r "s/80 default_server;/${PORT} default_server http2;/g" /etc/nginx/conf.d/default.conf -else - sed -i -r "s/80 default_server;/${PORT} default_server;/g" /etc/nginx/conf.d/default.conf -fi - -# Set Port for any additional vhosts -for filename in /etc/nginx/conf.d/*; do - if [ "$filename" != "/etc/nginx/conf.d/default.conf" ] - then - if [ $HTTP2 == "true" ] - then - sed -i -r "s/80;/${PORT} http2;/g" $filename - else - sed -i -r "s/80;/${PORT};/g" $filename - fi - fi -done - -# Start NGINX -nginx \ No newline at end of file diff --git a/php/8.2/fpm-nginx/etc/s6-rc.d/nginx/type b/php/8.2/fpm-nginx/etc/s6-rc.d/nginx/type deleted file mode 100644 index 1780f9f..0000000 --- a/php/8.2/fpm-nginx/etc/s6-rc.d/nginx/type +++ /dev/null @@ -1 +0,0 @@ -longrun \ No newline at end of file diff --git a/php/8.2/fpm-nginx/etc/s6-rc.d/php-fpm-running/dependencies b/php/8.2/fpm-nginx/etc/s6-rc.d/php-fpm-running/dependencies deleted file mode 100644 index 54f9367..0000000 --- a/php/8.2/fpm-nginx/etc/s6-rc.d/php-fpm-running/dependencies +++ /dev/null @@ -1 +0,0 @@ -php-fpm \ No newline at end of file diff --git a/php/8.2/fpm-nginx/etc/s6-rc.d/php-fpm-running/type b/php/8.2/fpm-nginx/etc/s6-rc.d/php-fpm-running/type deleted file mode 100644 index 3d92b15..0000000 --- a/php/8.2/fpm-nginx/etc/s6-rc.d/php-fpm-running/type +++ /dev/null @@ -1 +0,0 @@ -oneshot \ No newline at end of file diff --git a/php/8.2/fpm-nginx/etc/s6-rc.d/php-fpm-running/up b/php/8.2/fpm-nginx/etc/s6-rc.d/php-fpm-running/up deleted file mode 100644 index 45bc2dc..0000000 --- a/php/8.2/fpm-nginx/etc/s6-rc.d/php-fpm-running/up +++ /dev/null @@ -1 +0,0 @@ -ash /etc/s6-overlay/scripts/php-fpm-running \ No newline at end of file diff --git a/php/8.2/fpm-nginx/etc/s6-rc.d/user/contents.d/msmtp b/php/8.2/fpm-nginx/etc/s6-rc.d/user/contents.d/msmtp deleted file mode 100644 index e69de29..0000000 diff --git a/php/8.2/fpm-nginx/etc/s6-rc.d/user/contents.d/nginx b/php/8.2/fpm-nginx/etc/s6-rc.d/user/contents.d/nginx deleted file mode 100644 index e69de29..0000000 diff --git a/php/8.2/fpm-nginx/etc/s6-rc.d/user/contents.d/php-fpm-running b/php/8.2/fpm-nginx/etc/s6-rc.d/user/contents.d/php-fpm-running deleted file mode 100644 index e69de29..0000000 diff --git a/php/8.2/fpm-nginx/etc/scripts/msmtp-configure b/php/8.2/fpm-nginx/etc/scripts/msmtp-configure deleted file mode 100644 index 8c5848a..0000000 --- a/php/8.2/fpm-nginx/etc/scripts/msmtp-configure +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/with-contenv ash - -# Configure PHP to use MSMTP -sed -i -r 's|;sendmail_path =*|sendmail_path = "/usr/bin/msmtp -t"|g' /etc/php81/php.ini - -# Configure MSMTP -sed -i -r "s/^host .*$/host ${MSMTP_RELAY_SERVER_HOST:-"mailhog"}/g" /etc/msmtprc -sed -i -r "s/^port .*$/port ${MSMTP_RELAY_SERVER_PORT:-"1025"}/g" /etc/msmtprc -sed -i -r "s/^auth .*$/auth ${MSMTP_RELAY_SERVER_AUTH:-"on"}/g" /etc/msmtprc -sed -i -r "s/^user .*$/user ${MSMTP_RELAY_SERVER_USER}/g" /etc/msmtprc -sed -i -r "s/^password .*$/password ${MSMTP_RELAY_SERVER_PASSWORD}/g" /etc/msmtprc -sed -i -r "s/^from .*$/from ${MSMTP_RELAY_SERVER_FROM}/g" /etc/msmtprc \ No newline at end of file diff --git a/php/8.2/fpm-nginx/etc/scripts/php-fpm-running b/php/8.2/fpm-nginx/etc/scripts/php-fpm-running deleted file mode 100644 index 4e25a71..0000000 --- a/php/8.2/fpm-nginx/etc/scripts/php-fpm-running +++ /dev/null @@ -1,10 +0,0 @@ -#!/command/execlineb -P - -# Exit immediately if a command exits with a non-zero status -set -e - -# Wait until PHP-FPM is running on port 9000 -while ! netstat -tna | grep 'LISTEN\>' | grep -q ':9000\>'; do sleep 0.1; done - -# Exit -exit 0; \ No newline at end of file diff --git a/php/8.2/fpm/Dockerfile b/php/8.2/fpm/Dockerfile deleted file mode 100644 index d9b1927..0000000 --- a/php/8.2/fpm/Dockerfile +++ /dev/null @@ -1,65 +0,0 @@ -FROM ghcr.io/aliasproject/docker-baseimage-s6-overlay-alpine:latest - -LABEL maintainer="Michael Aguiar " - -# Set default PHP environment variables -ENV PHP_DATE_TIMEZONE="UTC" \ - PHP_DISPLAY_ERRORS=On \ - PHP_ERROR_REPORTING="E_ALL & ~E_DEPRECATED & ~E_STRICT" \ - PHP_MEMORY_LIMIT="256M" \ - PHP_MAX_EXECUTION_TIME="99" \ - PHP_POST_MAX_SIZE="100M" \ - PHP_UPLOAD_MAX_FILE_SIZE="100M" \ - PHP_POOL_NAME="www" \ - PHP_PM_CONTROL="dynamic" \ - PHP_PM_MAX_CHILDREN="20" \ - PHP_PM_START_SERVERS="2" \ - PHP_PM_MIN_SPARE_SERVERS="1" \ - PHP_PM_MAX_SPARE_SERVERS="3" - -# Install packages -RUN apk add --update --no-cache \ - curl \ - php82 \ - php82-fpm \ - php82-common \ - php82-curl \ - php82-gd \ - php82-exif \ - php82-pecl-imagick \ - php82-mbstring \ - php82-pdo_mysql \ - php82-mysqli \ - php82-session \ - php82-opcache \ - php82-xml \ - php82-xmlreader \ - php82-openssl \ - php82-bcmath \ - php82-ctype \ - php82-simplexml \ - php82-iconv \ - php82-dom \ - php82-json \ - php82-phar \ - php82-xmlwriter \ - php82-fileinfo \ - php82-tokenizer \ - php82-zip && \ - sed -i -e 's/\[www\]/\[$\{PHP_POOL_NAME\}]/g' /etc/php82/php-fpm.d/www.conf && \ - mkdir /app && \ - addgroup -S alias && \ - adduser -S alias -G alias && \ - chown -R alias.alias /app - -# Copy over S6 configurations -COPY etc/s6-rc.d/ /etc/s6-overlay/s6-rc.d - -# Configure PHP -COPY etc/php/php-fpm.d/y-override-php-defaults.conf /etc/php82/php-fpm.d/y-override-php-defaults.conf - -# Set the default work directory to our web user -WORKDIR /app - -# Run S6 -ENTRYPOINT ["/init"] \ No newline at end of file diff --git a/php/8.2/fpm/etc/php/php-fpm.d/y-override-php-defaults.conf b/php/8.2/fpm/etc/php/php-fpm.d/y-override-php-defaults.conf deleted file mode 100644 index b094e77..0000000 --- a/php/8.2/fpm/etc/php/php-fpm.d/y-override-php-defaults.conf +++ /dev/null @@ -1,242 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Docker friendly settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; These settings are offered specifically to behave well in a containerized environment. - -[global] -; Override default pid file -pid = /run/php-fpm.pid - -; Avoid logs being sent to syslog -error_log = /proc/self/fd/2 - -; Set this to php default's max_execution_time to allow children to stop gracefully when fpm is commanded to stop -; This helps avoiding 502's -process_control_timeout = 30 - -; Do not daemonize (eg send process to the background) -daemonize = no - -[${PHP_POOL_NAME}] -; Access from webserver container is via network, not socket file -listen = [::]:9000 - -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -user = alias -group = alias - -; Redirect logs to stdout - FPM closes /dev/std* on startup -access.log = /proc/self/fd/1 -catch_workers_output = yes - -; Remove "pool www" decoration from log output -decorate_workers_output = no - -; Required to allow config-by-environment -clear_env = no - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Process Management Settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = ${PHP_PM_CONTROL} - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = ${PHP_PM_MAX_CHILDREN} - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: (min_spare_servers + max_spare_servers) / 2 -pm.start_servers = ${PHP_PM_START_SERVERS} - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = ${PHP_PM_MIN_SPARE_SERVERS} - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = ${PHP_PM_MAX_SPARE_SERVERS} - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Healthcheck settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. It shows the following informations: -; pool - the name of the pool; -; process manager - static, dynamic or ondemand; -; start time - the date and time FPM has started; -; start since - number of seconds since FPM has started; -; accepted conn - the number of request accepted by the pool; -; listen queue - the number of request in the queue of pending -; connections (see backlog in listen(2)); -; max listen queue - the maximum number of requests in the queue -; of pending connections since FPM has started; -; listen queue len - the size of the socket queue of pending connections; -; idle processes - the number of idle processes; -; active processes - the number of active processes; -; total processes - the number of idle + active processes; -; max active processes - the maximum number of active processes since FPM -; has started; -; max children reached - number of times, the process limit has been reached, -; when pm tries to start more children (works only for -; pm 'dynamic' and 'ondemand'); -; Value are updated in real time. -; Example output: -; pool: www -; process manager: static -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 62636 -; accepted conn: 190460 -; listen queue: 0 -; max listen queue: 1 -; listen queue len: 42 -; idle processes: 4 -; active processes: 11 -; total processes: 15 -; max active processes: 12 -; max children reached: 0 -; -; By default the status page output is formatted as text/plain. Passing either -; 'html', 'xml' or 'json' in the query string will return the corresponding -; output syntax. Example: -; http://www.foo.bar/status -; http://www.foo.bar/status?json -; http://www.foo.bar/status?html -; http://www.foo.bar/status?xml -; -; By default the status page only outputs short status. Passing 'full' in the -; query string will also return status for each pool process. -; Example: -; http://www.foo.bar/status?full -; http://www.foo.bar/status?json&full -; http://www.foo.bar/status?html&full -; http://www.foo.bar/status?xml&full -; The Full status returns for each process: -; pid - the PID of the process; -; state - the state of the process (Idle, Running, ...); -; start time - the date and time the process has started; -; start since - the number of seconds since the process has started; -; requests - the number of requests the process has served; -; request duration - the duration in s of the requests; -; request method - the request method (GET, POST, ...); -; request URI - the request URI with the query string; -; content length - the content length of the request (only with POST); -; user - the user (PHP_AUTH_USER) (or '-' if not set); -; script - the main script called (or '-' if not set); -; last request cpu - the %cpu the last request consumed -; it's always 0 if the process is not in Idle state -; because CPU calculation is done when the request -; processing has terminated; -; last request memory - the max amount of memory the last request consumed -; it's always 0 if the process is not in Idle state -; because memory calculation is done when the request -; processing has terminated; -; If the process is in Idle state, then informations are related to the -; last request the process has served. Otherwise informations are related to -; the current request being served. -; Example output: -; ************************ -; pid: 31330 -; state: Running -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 63087 -; requests: 12808 -; request duration: 1250261 -; request method: GET -; request URI: /test_mem.php?N=10000 -; content length: 0 -; user: - -; script: /home/fat/web/docs/php/test_mem.php -; last request cpu: 0.00 -; last request memory: 0 -; -; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: /usr/share/php/8.0/fpm/status.html -; -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -;pm.status_path = /status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -ping.path = /ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Server Side Up Opinionated Settings -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; We believe everything should be secure by default. Some of these settings -; can be changed with environment variables. - - -; Security measures -;php_admin_value[open_basedir] = ${WEBUSER_HOME}:/dev/stdout:/tmp -;php_admin_flag[session.cookie_secure] = true - -; Regional settings -php_value[date.timezone] = ${PHP_DATE_TIMEZONE} - -; Error reporting settings -php_admin_value[display_errors] = ${PHP_DISPLAY_ERRORS} -php_admin_value[error_reporting] = ${PHP_ERROR_REPORTING} - -; Performance settings -php_admin_value[memory_limit] = ${PHP_MEMORY_LIMIT} -php_admin_value[max_execution_time] = ${PHP_MAX_EXECUTION_TIME} - -; Upload settings -php_admin_value[post_max_size] = ${PHP_POST_MAX_SIZE} -php_admin_value[upload_max_filesize] = ${PHP_UPLOAD_MAX_FILE_SIZE} diff --git a/php/8.2/fpm/etc/s6-rc.d/php-fpm/run b/php/8.2/fpm/etc/s6-rc.d/php-fpm/run deleted file mode 100644 index aaf4251..0000000 --- a/php/8.2/fpm/etc/s6-rc.d/php-fpm/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/command/with-contenv ash - -# Start PHP-FPM -/usr/sbin/php-fpm82 --nodaemonize - diff --git a/php/8.2/fpm/etc/s6-rc.d/php-fpm/type b/php/8.2/fpm/etc/s6-rc.d/php-fpm/type deleted file mode 100644 index 1780f9f..0000000 --- a/php/8.2/fpm/etc/s6-rc.d/php-fpm/type +++ /dev/null @@ -1 +0,0 @@ -longrun \ No newline at end of file diff --git a/php/8.2/fpm/etc/s6-rc.d/user/contents.d/php-fpm b/php/8.2/fpm/etc/s6-rc.d/user/contents.d/php-fpm deleted file mode 100644 index e69de29..0000000 From 1972cac9b44393b7d6576ce2806ce5190e21fad4 Mon Sep 17 00:00:00 2001 From: Michael Aguiar Date: Mon, 19 Oct 2026 16:03:44 -0700 Subject: [PATCH 2/2] Correct the README's list of CLI versions There is no 8.2 cli image; the intro said there were CLI images for the same versions as FrankenPHP (8.2-8.5). --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aedd096..6098288 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # docker-php -Docker images for PHP, published to `ghcr.io/aliasproject/php`. The primary offering is [FrankenPHP](https://frankenphp.dev/) (Caddy + PHP) for 8.2–8.5, plus CLI images for the same versions. CLI images are also published for 7.4–8.1. +Docker images for PHP, published to `ghcr.io/aliasproject/php`. The primary offering is [FrankenPHP](https://frankenphp.dev/) (Caddy + PHP) for 8.2–8.5, plus CLI images for 7.4–8.1 and 8.3–8.5. ## Image matrix