GithubHelp home page GithubHelp logo

zeyadmbk / docker-compose-apache-php-mariadb-dev Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 7 KB

This is a sample Docker Compose configuration that sets up a development environment with Apache, PHP 8.2, and MariaDB 10.11.3. It allows you to quickly spin up a local development environment for web applications that require these technologies.

License: MIT License

Dockerfile 100.00%
apache docker docker-compose mariadb php

docker-compose-apache-php-mariadb-dev's Introduction

Docker Compose Configuration for Apache, PHP 8.2, and MariaDB 10.11.3 (Development Environment)

Docker Apache PHP MariaDB NodeJS NPM

This is a sample Docker Compose configuration that sets up a development environment with Apache, PHP 8.2, and MariaDB 10.11.3. It allows you to quickly spin up a local development environment for web applications that require these technologies.

Prerequisites

Usage

  1. Clone this repository: git clone https://github.com/zeyadmbk/docker-compose-apache-php-mariadb-dev.git
  2. Navigate to the project directory: cd docker-compose-apache-php-mariadb-dev
  3. Modify the docker-compose.yml file according to your requirements. You can adjust the exposed ports, database credentials, and other settings as needed.
  4. Start the containers: docker-compose -f docker-compose.yml up -d
  5. Access your web application in a browser: http://localhost:80

Configuration

The docker-compose.yml file contains the following services:

apache-php

  • Build: using custom docker image built using ./build/apache-php/Dockerfile file.
  • Ports:
    • 80:80 (map container port 80 to host port 80)
  • Volumes:
    • /usr/dev/project/:/var/www/html/ (mount the /usr/dev/project/ directory to Apache's document root)

mariadb

  • Image: mariadb:10.11.3
  • Environment variables:
    • MYSQL_ROOT_PASSWORD (set your desired root password)
    • MYSQL_DATABASE (set the name of the initial database) (Optional)
    • MYSQL_USER (a username account to be created when the container is created) (Optional)
    • MYSQL_PASSWORD (a password for the user account above to be created when the container is created) (Optional)

Feel free to modify this configuration based on your specific requirements.

Notes

  • This configuration is intended for development purposes only. It may not be suitable for production environments.
  • Make sure to secure your database by using strong passwords and other security measures when deploying to a production environment.

License

This project is licensed under the MIT License. Feel free to use and modify it to suit your needs.


For more information on Docker Compose and its capabilities, please refer to the official documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.