Giter Site home page Giter Site logo

sawyerhnn / docker-apache-mysql-php Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hahnrobi/docker-apache-mysql-php

0.0 0.0 0.0 89 KB

This repo contains a sample structure for running LAMP stack inside a Docker container

HTML 75.33% Dockerfile 24.67%

docker-apache-mysql-php's Introduction

Boilerplate code for simple LAMP stack in Docker

What is this?

This repository has some basic codes to help you kickstart hosting a PHP site with Apache and MySQL. It could be used to transfer your existing PHP website to Docker.

How to use it?

You need Docker and Docker Compose to be installed on your computer/server. You can simply start the services with the docker-compose up command. It's suggested to do a first run without the -d attribute, to see all outputs from each containers to check for any configuration errors.

Used images

  • Apache: ubuntu/apache2:2.4-20.04_beta
  • PHP: php:7-fpm (feel free to change it to your desired version. It should be PHP 8, not 7)
  • MySQL: mariadb (Choose your desired version. By default it's the latest)

Folder structure

  • conf: All the configuration files mapped into this folder.
    • apache: Apache configuration files. By default only the sites-available directory is mounted.
      • sites-available: VirtualHosts, 000-default.conf is used for the config.
    • php: PHP configuration files, php.ini, etc.
    • php-fpm: The stack uses PHP-FPM, which can run multiple PHP instanced in pools. You can configure them here.
  • db: Permanent storage for the MariaDB server
  • html: The served files go there directly.
  • images: Directory to store custom Docker images for the project.
  • log: You can find there all the log files from the different containers.

docker-apache-mysql-php's People

Contributors

hahnrobi avatar

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.