Skip to content

gehlotanish/docker-php-fpm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages