Added goal of this project

This commit is contained in:
Tim de Pater 2021-09-25 07:41:10 +02:00
parent 3a38277dc8
commit 9365423d74
No known key found for this signature in database
GPG Key ID: BFE5D809439C9723

View File

@ -1,6 +1,5 @@
# Docker PHP-FPM 8.0 & Nginx 1.20 on Alpine Linux # Docker PHP-FPM 8.0 & Nginx 1.20 on Alpine Linux
Example PHP-FPM 8.0 & Nginx 1.20 setup for Docker, build on [Alpine Linux](https://www.alpinelinux.org/). Example PHP-FPM 8.0 & Nginx 1.20 container image for Docker, build on [Alpine Linux](https://www.alpinelinux.org/).
The image is only +/- 40MB large.
Repository: https://github.com/TrafeX/docker-php-nginx Repository: https://github.com/TrafeX/docker-php-nginx
@ -9,24 +8,19 @@ Repository: https://github.com/TrafeX/docker-php-nginx
* Very small Docker image size (+/-40MB) * Very small Docker image size (+/-40MB)
* Uses PHP 8.0 for better performance, lower CPU usage & memory footprint * Uses PHP 8.0 for better performance, lower CPU usage & memory footprint
* Optimized for 100 concurrent users * Optimized for 100 concurrent users
* Optimized to only use resources when there's traffic (by using PHP-FPM's on-demand PM) * Optimized to only use resources when there's traffic (by using PHP-FPM's `on-demand` process manager)
* The servers Nginx, PHP-FPM and supervisord run under a non-privileged user (nobody) to make it more secure * The services Nginx, PHP-FPM and supervisord run under a non-privileged user (nobody) to make it more secure
* The logs of all the services are redirected to the output of the Docker container (visible with `docker logs -f <container name>`) * The logs of all the services are redirected to the output of the Docker container (visible with `docker logs -f <container name>`)
* Follows the KISS principle (Keep It Simple, Stupid) to make it easy to understand and adjust the image to your needs * Follows the KISS principle (Keep It Simple, Stupid) to make it easy to understand and adjust the image to your needs
[![Docker Pulls](https://img.shields.io/docker/pulls/trafex/php-nginx.svg)](https://hub.docker.com/r/trafex/php-nginx/) [![Docker Pulls](https://img.shields.io/docker/pulls/trafex/php-nginx.svg)](https://hub.docker.com/r/trafex/php-nginx/)
![nginx 1.18.0](https://img.shields.io/badge/nginx-1.20-brightgreen.svg) ![nginx 1.18.0](https://img.shields.io/badge/nginx-1.20-brightgreen.svg)
![php 8.0](https://img.shields.io/badge/php-8.0-brightgreen.svg) ![php 8.0](https://img.shields.io/badge/php-8.0-brightgreen.svg)
![License MIT](https://img.shields.io/badge/license-MIT-blue.svg) ![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)
### Docker Hub repository name change ## Goal of this project
Since we switched to PHP8 the repository name [trafex/alpine-nginx-php7](https://hub.docker.com/r/trafex/alpine-nginx-php7) didn't make sense anymore. The goal of this container image is to provide an example for running Nginx and PHP-FPM in a container which follows
Because you can't change the name of the repository on Docker Hub I created a new one. the best practices and is easy to understand and modify to your needs.
From now on this image can be pulled from Docker Hub under the name [trafex/php-nginx](https://hub.docker.com/r/trafex/php-nginx).
The old repository will still be available and kept up to date with [trafex/php-nginx](https://hub.docker.com/r/trafex/php-nginx).
## Usage ## Usage
@ -40,6 +34,12 @@ Or mount your own code to be served by PHP-FPM & Nginx
docker run -p 80:8080 -v ~/my-codebase:/var/www/html trafex/php-nginx docker run -p 80:8080 -v ~/my-codebase:/var/www/html trafex/php-nginx
### Docker Hub repository name change
Since we switched to PHP8 the repository name [trafex/alpine-nginx-php7](https://hub.docker.com/r/trafex/alpine-nginx-php7) didn't make sense anymore.
Because you can't change the name of the repository on Docker Hub I created a new one.
From now on this image can be pulled from Docker Hub under the name [trafex/php-nginx](https://hub.docker.com/r/trafex/php-nginx).
## Configuration ## Configuration
In [config/](config/) you'll find the default configuration files for Nginx, PHP and PHP-FPM. In [config/](config/) you'll find the default configuration files for Nginx, PHP and PHP-FPM.
If you want to extend or customize that you can do so by mounting a configuration file in the correct folder; If you want to extend or customize that you can do so by mounting a configuration file in the correct folder;