{"id":13561524,"url":"https://github.com/TrafeX/docker-php-nginx","last_synced_at":"2025-04-03T17:30:59.751Z","repository":{"id":37432303,"uuid":"51772062","full_name":"TrafeX/docker-php-nginx","owner":"TrafeX","description":"Docker image with PHP-FPM 8.4 \u0026 Nginx 1.26 on Alpine Linux","archived":false,"fork":false,"pushed_at":"2025-02-23T07:01:47.000Z","size":153,"stargazers_count":1429,"open_issues_count":1,"forks_count":751,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-03-27T15:07:12.909Z","etag":null,"topics":["alpine","alpine-linux","arm64","armv7","composer","container","containers","docker","docker-image","nginx","nginx-docker","php","php-fpm","php8","php8-docker","php84","php84-docker"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/trafex/php-nginx","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TrafeX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-15T17:20:49.000Z","updated_at":"2025-03-27T12:44:26.000Z","dependencies_parsed_at":"2023-11-17T20:01:38.088Z","dependency_job_id":"98d56402-fb97-46ec-a435-4bb11a793ba2","html_url":"https://github.com/TrafeX/docker-php-nginx","commit_stats":{"total_commits":137,"total_committers":22,"mean_commits":"6.2272727272727275","dds":"0.24817518248175185","last_synced_commit":"e5c5ec7f7b14be1001681124de50cf518a87da62"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrafeX%2Fdocker-php-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrafeX%2Fdocker-php-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrafeX%2Fdocker-php-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrafeX%2Fdocker-php-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TrafeX","download_url":"https://codeload.github.com/TrafeX/docker-php-nginx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247033796,"owners_count":20872532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpine","alpine-linux","arm64","armv7","composer","container","containers","docker","docker-image","nginx","nginx-docker","php","php-fpm","php8","php8-docker","php84","php84-docker"],"created_at":"2024-08-01T13:00:57.891Z","updated_at":"2025-04-03T17:30:59.746Z","avatar_url":"https://github.com/TrafeX.png","language":"Dockerfile","readme":"# Docker PHP-FPM 8.4 \u0026 Nginx 1.26 on Alpine Linux\nExample PHP-FPM 8.4 \u0026 Nginx 1.26 container image for Docker, built on [Alpine Linux](https://www.alpinelinux.org/).\n\nRepository: https://github.com/TrafeX/docker-php-nginx\n\n\n* Built on the lightweight and secure Alpine Linux distribution\n* Multi-platform, supporting AMD4, ARMv6, ARMv7, ARM64\n* Very small Docker image size (+/-40MB)\n* Uses PHP 8.4 for the best performance, low CPU usage \u0026 memory footprint\n* Optimized for 100 concurrent users\n* Optimized to only use resources when there's traffic (by using PHP-FPM's `on-demand` process manager)\n* The services Nginx, PHP-FPM and supervisord run under a non-privileged user (nobody) to make it more secure\n* The logs of all the services are redirected to the output of the Docker container (visible with `docker logs -f \u003ccontainer name\u003e`)\n* Follows the KISS principle (Keep It Simple, Stupid) to make it easy to understand and adjust the image to your needs\n\n[![Docker Pulls](https://img.shields.io/docker/pulls/trafex/php-nginx.svg)](https://hub.docker.com/r/trafex/php-nginx/)\n![nginx 1.26](https://img.shields.io/badge/nginx-1.26-brightgreen.svg)\n![php 8.4](https://img.shields.io/badge/php-8.4-brightgreen.svg)\n![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)\n\n## [![Trafex Consultancy](https://timdepater.com/logo/mini-logo.png)](https://timdepater.com?mtm_campaign=github)\nI can help you with [Containerization, Kubernetes, Monitoring, Infrastructure as Code and other DevOps challenges](https://timdepater.com/?mtm_campaign=github).\n\n\n## Goal of this project\nThe goal of this container image is to provide an example for running Nginx and PHP-FPM in a container which follows\nthe best practices and is easy to understand and modify to your needs.\n\n## Usage\n\nStart the Docker container:\n\n    docker run -p 80:8080 trafex/php-nginx\n\nSee the PHP info on http://localhost, or the static html page on http://localhost/test.html\n\nOr mount your own code to be served by PHP-FPM \u0026 Nginx\n\n    docker run -p 80:8080 -v ~/my-codebase:/var/www/html trafex/php-nginx\n\n## Versioning\nMajor or minor changes are always published as a [release](https://github.com/TrafeX/docker-php-nginx/releases) with correspondending changelogs.\nThe `latest` tag is automatically updated weekly to include the latests patches from Alpine Linux.\n\n## Configuration\nIn [config/](config/) you'll find the default configuration files for Nginx, PHP and PHP-FPM.\nIf you want to extend or customize that you can do so by mounting a configuration file in the correct folder;\n\nNginx configuration:\n\n    docker run -v \"`pwd`/nginx-server.conf:/etc/nginx/conf.d/server.conf\" trafex/php-nginx\n\nPHP configuration:\n\n    docker run -v \"`pwd`/php-setting.ini:/etc/php84/conf.d/settings.ini\" trafex/php-nginx\n\nPHP-FPM configuration:\n\n    docker run -v \"`pwd`/php-fpm-settings.conf:/etc/php84/php-fpm.d/server.conf\" trafex/php-nginx\n\n_Note; Because `-v` requires an absolute path I've added `pwd` in the example to return the absolute path to the current directory_\n\n## Documentation and examples\nTo modify this container to your specific needs please see the following examples;\n\n* [Adding xdebug support](https://github.com/TrafeX/docker-php-nginx/blob/master/docs/xdebug-support.md)\n* [Adding composer](https://github.com/TrafeX/docker-php-nginx/blob/master/docs/composer-support.md)\n* [Getting the real IP of the client behind a load balancer](https://github.com/TrafeX/docker-php-nginx/blob/master/docs/real-ip-behind-loadbalancer.md)\n* [Sending e-mails](https://github.com/TrafeX/docker-php-nginx/blob/master/docs/sending-emails.md)","funding_links":[],"categories":["Dockerfile"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTrafeX%2Fdocker-php-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTrafeX%2Fdocker-php-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTrafeX%2Fdocker-php-nginx/lists"}