From e4b6bc8eb8e8a97448bb1c52f0cf46953d20afcd Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Sun, 7 Apr 2024 11:54:21 +0200 Subject: [PATCH] feat: add nginx base image --- .github/workflows/docker.yaml | 36 +++++++++++++++ README.md | 9 ++-- examples/nginx-php-fpm/Dockerfile | 18 -------- examples/nginx-php-fpm/README.md | 5 --- .../rootfs/etc/php/php-fpm.d/zz-user.conf | 3 -- examples/nginx-symfony-demo/Dockerfile | 38 ++++++++++++++++ examples/nginx-symfony-demo/README.md | 12 +++++ .../etc/php/php-fpm.d/zz-b-default.conf | 2 + images/nginx/Dockerfile | 16 +++++++ images/nginx/README.md | 44 +++++++++++++++++++ .../nginx}/rootfs/etc/Procfile | 0 .../nginx}/rootfs/etc/nginx/nginx.conf | 5 +++ .../rootfs/var/www/html/public/index.php | 0 13 files changed, 158 insertions(+), 30 deletions(-) delete mode 100644 examples/nginx-php-fpm/Dockerfile delete mode 100644 examples/nginx-php-fpm/README.md delete mode 100644 examples/nginx-php-fpm/rootfs/etc/php/php-fpm.d/zz-user.conf create mode 100644 examples/nginx-symfony-demo/Dockerfile create mode 100644 examples/nginx-symfony-demo/README.md create mode 100644 images/nginx/Dockerfile create mode 100644 images/nginx/README.md rename {examples/nginx-php-fpm => images/nginx}/rootfs/etc/Procfile (100%) rename {examples/nginx-php-fpm => images/nginx}/rootfs/etc/nginx/nginx.conf (91%) rename {examples/nginx-php-fpm => images/nginx}/rootfs/var/www/html/public/index.php (100%) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 735f388..69a104a 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -116,3 +116,39 @@ jobs: - name: Sign image run: cosign sign --yes ghcr.io/shyim/wolfi-php/fpm:${{ matrix.php }} + + nginx: + runs-on: ubuntu-latest + needs: fpm + strategy: + matrix: + php: + - 8.2 + - 8.3 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Cosign + uses: sigstore/cosign-installer@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login into Github Docker Registery + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + + - uses: docker/build-push-action@v5 + with: + tags: ghcr.io/shyim/wolfi-php/nginx:${{ matrix.php }} + platforms: linux/amd64,linux/arm64 + context: images/nginx + build-args: PHP_VERSION=${{ matrix.php }} + push: true + provenance: false + + - name: Sign image + run: cosign sign --yes ghcr.io/shyim/wolfi-php/nginx:${{ matrix.php }} diff --git a/README.md b/README.md index 35beb7f..421a492 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,8 @@ To learn more about FrankenPHP, [see here](./images/frankenphp) We provide also base image for ready to start without touching configuration: - [FrankenPHP](./images/frankenphp) -- [FPM](./images/fpm) +- [Nginx + PHP-FPM](./images/nginx) +- [FPM standalone](./images/fpm) ### Pinning package versions @@ -119,6 +120,6 @@ To get the excact current version of a package, you can run `apk info php-8.2`. ## Examples -- [Symfony Demo with FrankenPHP](examples/frankenphp-symfony-demo/README.md) -- [Symfony demo with FPM](examples/fpm-symfony-demo/README.md) -- [Nginx + PHP-FPM](examples/nginx-php-fpm/README.md) +- [Symfony Demo with FrankenPHP](examples/frankenphp-symfony-demo/) +- [Symfony Demo with FPM](examples/fpm-symfony-demo/) +- [Symfony Demo with Nginx](examples/nginx-symfony-demo/) diff --git a/examples/nginx-php-fpm/Dockerfile b/examples/nginx-php-fpm/Dockerfile deleted file mode 100644 index 1fc5502..0000000 --- a/examples/nginx-php-fpm/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM ghcr.io/shyim/wolfi-php/base:latest - -ARG PHP_VERSION=8.3 - -RUN <