Giter Site home page Giter Site logo

docker-php-fpm's Introduction

LEMP stack built with Docker Compose

Docker + PHP-FPM

This is a basic LEMP stack environment built using Docker Compose. It consists following:

  • PHP-FPM
  • Nginx
  • MySQL 5.7
  • PhpMyAdmin
  • Redis

As of now, we have 5 different branches for different PHP-FPM versions. Use appropriate branch as per your php-fpm version need:

Master branch

Code in www directory can execute different php-fpm version based on nginx configuration.

example.com                         example2.com
    |                                   |
    |php-fpm:7.3.x                      |php-fpm:7.2.x
    |                                   |
     ───────────────────────────────────
                     |
                    www

Installation

Clone this repository on your local computer and checkout the appropriate branch e.g. 7.x.x. Run the docker-compose up -d.

git clone https://github.com/gehlotanish/docker-php-fpm.git        
cd docker-php/
git fetch --all
cd bin/ 
bash install-docker.sh
bash install-docker-compose.sh
git checkout fpm-7.x.x
docker-compose up -d

Your LEMP stack is now ready!! You can access it via http://localhost.

Connect via SSH

You can connect to web server using docker exec command to perform various operation on it. Use below command to login to container via ssh.

docker exec -it webserver /bin/bash
docker exec -it mysql /bin/bash

Configuration

This package comes with default configuration options. You can modify them by creating .env file in your root directory.

To make it easy, just copy the content from sample.env file and update the environment variable values as per your need.

phpMyAdmin

phpMyAdmin is configured to run on port 8000. Use following default url.

http://localhost:8000/

Redis

It comes with Redis. It runs on default port 6379.

Configuration and Usage

Please read from appropriate version branch.

docker-php-fpm's People

Contributors

gehlotanish avatar

Watchers

 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.