This repository provides a Docker image for an LNMP stack (L
inux, N
ginx, M
ySQL, and P
HP-FPM), commonly referred to as LEMP.
It is designed to simplify the deployment of PHP applications with a robust and modern environment.
The image is built on top of other modular images from the fbraz3
ecosystem, ensuring flexibility, maintainability, and ease of use.
We also provide an AI generated DeepWiki Page with more technical information.
💡 For a complete list of available images, please visit the PHP System Docs page.
The image follows a consistent tagging scheme:
PHP Version Tags
: Each tag corresponds to a specific PHP version (e.g.,8.2
,8.3
).Flavors
: Tags may include additional flavor identifiers (e.g.,-phalcon
).Multi-Arch Support
: Images are available for bothamd64
andarm64
architectures.Latest Tag
: Thelatest
tag always points to the most recent stable PHP version.
This image supports multiple flavors to cater to different use cases:
Vanilla
: A standard LNMP stack with no additional frameworks.Phalcon
: Includes the Phalcon PHP framework pre-installed.
To use this image, create a docker-compose.yml
file in your application root directory:
services:
web:
image: fbraz3/lnmp
volumes:
- ./:/app/public/
ports:
- "127.0.0.1:80:80"
- "127.0.0.1:3306:3306"
Run the following command to start the container:
docker-compose up -d
Your application will be accessible at http://localhost/
, and phpMyAdmin will be available at http://localhost/pma/
.
This image allows you to customize PHP directives using environment variables.
For detailed instructions, refer to the php-fpm-docker documentation.
Cronjobs can be configured by binding a file to /cronfile
in the container. The system will automatically install and execute the jobs.
For more details, see the php-fpm-docker documentation.
To enable email sending, this image relies on the configuration provided in the php-base-docker
project.
Follow the instructions in the php-base-docker documentation to set up email functionality.
Contributions are welcome! Feel free to open issues or submit pull requests to improve the project.
Please visit the CONTRIBUTING.md file for guidelines on how to contribute to this project.
I spend a lot of time and effort maintaining this project. If you find it useful, consider supporting me with a donation:
This project is licensed under the Apache License 2.0, so you can use it for personal and commercial projects. However, please note that the images are provided "as is" without any warranty or guarantee of any kind. Use them at your own risk.