Sign inSign up

proudnerdswp/pn-nginx-php-83-cache

By proudnerdswp

•Updated 7 months ago

Image
0

1.1K

proudnerdswp/pn-nginx-php-83-cache repository overview

⁠Proud Nerds Nginx PHP 8.3 Proxy Cache Image

This image is based on the PHP 8.3 FPM container. The container contains a nginx proxy cache server with an upstream to the nginx webserver with some additional settings for use in OpenShift.

⁠Requirements for the image to do its work in Openshift

This image requires a PV to /home/nginx/ where nginx saves all it's cache and temporary data. Without it, the image fails to startup and run. The nginx webserver expects the website to be in /var/www/public/

⁠Example Dockerfile for use in projects:

To use this image, an intermediate Dockerfile is required in the project git, so it can be compiled into a working image. The following example is a basic example for a WordPress project using W3TC. Please note, that this image probably requires some additional PV's to store image data. So it's likely this specific project requires these PV's:

  • /home/nginx/
  • /var/www/public/wp-content/cache
  • /var/www/public/wp-content/uploads
  • /var/www/public/wp-content/w3tc-config
FROM docker.io/proudnerdswp/pn-nginx-php-83-cache:chp5

# Move website to the current WORKDIR
COPY --chown=1001:root ./public /var/www/public/
COPY --chown=1001:root ./config /var/www/config/

# Make sure we always add the W3TC files even if they are not included in the current commit
COPY --chown=1001:root ./public/wp-content/plugins/w3-total-cache/wp-content/advanced-cache.php /var/www/public/wp-content/advanced-cache.php
COPY --chown=1001:root ./public/wp-content/plugins/w3-total-cache/wp-content/object-cache.php /var/www/public/wp-content/object-cache.php
COPY --chown=1001:root ./public/wp-content/plugins/w3-total-cache/wp-content/db.php /var/www/public/wp-content/db.php

# Define new working dir
WORKDIR /var/www/public

USER 1001

Tag summary

Content type

Image

Digest

sha256:c3cde428b…

Size

312.7 MB

Last updated

7 months ago

docker pull proudnerdswp/pn-nginx-php-83-cache:chp5ip