Skip to content

Latest commit

 

History

History
96 lines (49 loc) · 1.94 KB

getting-started.md

File metadata and controls

96 lines (49 loc) · 1.94 KB

Getting Started

Table of contents:

  1. Getting Started

  2. Docker-compose

  3. Configure PHP

  4. Configure Nginx

  5. Configure MySQL

  6. Configure Redis

  7. Configure MongoDB

Getting Started

If live behind the GFW please read this post Use Ali cloud

Requirements

Windows and Mac users only need to install Docker

Getting Started

git clone https://github.com/huangyanxiong01/docker-php.git

cd docker-php

docker-compose up -d

Now,you can open http://127.0.0.1:3000/ in browser

Docker-compose

The service contains nginx, redis, mongodb, mysql, node.js

  • docker-compose stop

Stop service

  • docker-compose start

start service

  • docker-compose restart

restart service

Configure PHP

  • Does php contain those extensions?

PHP Modules | Zend Modules -----| ------- | ------------- Core,date,libxml,openssl,pcre,zlib,filter,hash,pcntl,Reflection | xdebug SPL,session,standard,mysqlnd,PDO,xml,calendar,ctype,dom | opcahce sockets,ev,mbstring,fileinfo,ftp,gd,gettext,iconv,json,exif,mongodb | mysqli,pdo_mysql,Phar,posix,readline,shmop,SimpleXML,eio,swoole | sysvmsg,sysvsem,sysvshm,tokenizer,uv,wddx,xmlreader,xmlwriter,xsl,zip,Zend |

Configure Nginx

  • How change Nginx listen port?

You can find .env file in project root dir,Modify the value of NGINX_PORT

Configure MySQL

  • How change MySQL the username,password ?

You can find mysql.env file in project docker/mysql/ dir,Modify the value of MySQL

Configure Redis

Please read the official documentation

Configure MongoDB

Please read the official documentation