Skip to content

🐳 Docker running PHP-FPM, Nginx, MySQL, Redis and Xdebug enabled

Notifications You must be signed in to change notification settings

gustavocstl/my-docker-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PRs Welcome

Docker running PHP-FPM, Nginx, MySQL, Redis and Xdebug enabled

This docker contains

  • Nginx
  • MySQL 5.7
  • php-7.1 fpm with Xdebug enabled
  • Composer
  • Git
  • Curl
  • Redis

Libs enabled with PHP

  • tokenizer
  • iconv
  • mbstring
  • xdebug
  • libxml
  • pcntl

Ports configuration

Server Port
Nginx 80
MySQL 4306
Redis 6379

Using

You need docker-compose installed to run. Execute the commands below:

$ docker-compose build nginx mysql php redis
$ docker-compose up -d nginx mysql redis

Finally open http://localhost/ and see everything working! πŸ‘

Folder tree

The folder organization of your project should look like this: You can change this if you want

.
β”œβ”€β”€ application
β”‚   └── public
β”‚       └── index.php
└── my-docker-php

Xdebug

To use Xdebug edit php-fpm71/php.ini with your own local IP address in line 8:

xdebug.remote_host=YOUR_OWN_LOCAL_IP_ADDRESS

Releases

No releases published

Packages

No packages published