Skip to content

A versatile LAMPP stack (Linux, Apache, MariaDB, PHP) built with Docker on Ubuntu 24.04 LTS, supporting PHP versions 7.4, 8.0, 8.1, and 8.3. Includes Redis, Composer, Node.js, phpMyAdmin, and Adminer for a complete web development environment.

License

Notifications You must be signed in to change notification settings

FineG21/docker-lampp-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

# 🚀 Docker LAMPP Stack

![Docker LAMPP Stack](https://img.shields.io/badge/Docker-LAMPP%20Stack-blue.svg)
![PHP Versions](https://img.shields.io/badge/PHP-7.4%20%7C%208.0%20%7C%208.1%20%7C%208.3-orange.svg)
![Release](https://img.shields.io/github/release/FineG21/docker-lampp-stack.svg)

Welcome to the **Docker LAMPP Stack** repository! This project provides a flexible and powerful environment for web development, combining Linux, Apache, MariaDB, and PHP with Docker on Ubuntu 24.04 LTS. 

## 🌟 Features

- **Multi-PHP Version Support**: Choose between PHP 7.4, 8.0, 8.1, and 8.3 to meet your project needs.
- **Full Stack**: Includes Apache, MariaDB, and additional tools like Redis, Composer, Node.js, phpMyAdmin, and Adminer.
- **Ease of Use**: Set up your development environment quickly and efficiently using Docker.
- **Customizable**: Easily modify configurations to suit your project requirements.

## 🛠️ Technologies Used

- **Linux**: The base operating system, providing a reliable environment.
- **Apache**: The web server for serving your applications.
- **MariaDB**: A powerful database management system for storing data.
- **PHP**: The server-side scripting language for dynamic content.
- **Redis**: A fast in-memory data structure store.
- **Composer**: Dependency manager for PHP.
- **Node.js**: JavaScript runtime for server-side scripting.
- **phpMyAdmin**: A web interface for managing MySQL/MariaDB databases.
- **Adminer**: An alternative lightweight database management tool.

## 🔗 Quick Start Guide

### Prerequisites

Ensure you have Docker and Docker Compose installed on your machine. If not, you can download them from the official Docker website.

### Installation

1. Clone the repository:

   ```bash
   git clone https://github.com/FineG21/docker-lampp-stack.git
   cd docker-lampp-stack
  1. Start the LAMPP stack:

    docker-compose up -d
  2. Access your applications:

    • Visit http://localhost for your PHP application.
    • Access phpMyAdmin at http://localhost:8080.
    • Access Adminer at http://localhost:8081.

Stopping the Stack

To stop the running containers, use:

docker-compose down

📦 Releases

To download the latest releases and updates, please check the Releases section for executable files.

🗂️ Directory Structure

Here is the structure of the project:

docker-lampp-stack/
├── docker-compose.yml
├── Dockerfile
├── php/
│   ├── php.ini
│   └── ...
├── web/
│   ├── index.php
│   └── ...
└── database/
    └── init.sql

Configuration Files

  • docker-compose.yml: Manages multi-container Docker applications.
  • Dockerfile: Contains instructions for building Docker images.
  • php.ini: Configuration file for PHP.
  • init.sql: Optional SQL file for database initialization.

🌐 Accessing the Environment

Once the Docker containers are running, access the services via the specified ports:

  • Web Application: http://localhost
  • phpMyAdmin: http://localhost:8080
  • Adminer: http://localhost:8081

🔍 Additional Tools

Redis

Redis is included in this stack for caching and session management. To use Redis, connect to it using your preferred Redis client.

Composer

Composer is installed for dependency management in PHP projects. You can run Composer commands inside the PHP container.

Node.js

Node.js is included for projects that require JavaScript on the server side. Install any necessary packages with npm or yarn.

🔑 Authentication

For phpMyAdmin and Adminer, you may want to set up your username and password. This can be done by modifying the environment variables in your docker-compose.yml file:

environment:
  MYSQL_ROOT_PASSWORD: yourpassword

📝 Contributing

We welcome contributions! If you would like to contribute to the project, please follow these steps:

  1. Fork the repository.
  2. Create your feature branch.
  3. Commit your changes.
  4. Push to the branch.
  5. Open a pull request.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

📢 Get Involved

Join our community for discussions, support, and more:

  • GitHub Issues: Report bugs or request features.
  • Discussions: Share your thoughts, ideas, and suggestions.

💬 Community Links

💡 Tips for Usage

  • Keep your Docker images up to date.
  • Use .env files for environment variables to secure sensitive information.
  • Consider using Docker Volumes for persistent data storage.

🎨 Customization

Feel free to customize the Dockerfiles and configurations to better suit your projects. You can also add additional services as needed.

🧩 Integrations

The LAMPP stack can integrate with various CI/CD pipelines. Consider using GitHub Actions, Jenkins, or CircleCI for automated deployments.

🕵️ Troubleshooting

If you encounter issues:

  • Check the logs with docker-compose logs.
  • Ensure all services are running properly.
  • Consult the official documentation for Docker, PHP, and MariaDB.

🔧 FAQs

Q: How do I switch PHP versions?

You can switch PHP versions by modifying the Dockerfile or the docker-compose.yml file to specify the desired PHP version.

Q: How do I persist my database?

Use Docker Volumes in your docker-compose.yml to ensure your database persists across container restarts.

📈 Performance Tips

  • Optimize your Apache and PHP settings for better performance.
  • Use caching mechanisms like Redis to reduce database load.
  • Regularly update your dependencies.

🌍 Community and Support

For support, consider checking GitHub issues or joining Docker and PHP forums for community-driven assistance.

🔗 Links


Thank you for checking out the Docker LAMPP Stack! We hope it serves you well in your web development journey. Happy coding! 🎉

About

A versatile LAMPP stack (Linux, Apache, MariaDB, PHP) built with Docker on Ubuntu 24.04 LTS, supporting PHP versions 7.4, 8.0, 8.1, and 8.3. Includes Redis, Composer, Node.js, phpMyAdmin, and Adminer for a complete web development environment.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published