Skip to content

Latest commit

 

History

History
100 lines (51 loc) · 1.91 KB

getting-started.Zh-cn.md

File metadata and controls

100 lines (51 loc) · 1.91 KB

Getting Started

Table of contents:

  1. Getting Started

  2. Docker-compose基本用法

  3. 配置 PHP

  4. 配置 Nginx

  5. 配置 MySQL

  6. 配置 Redis

  7. 配置 MongoDB

Getting Started

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

请先安装

Windows and Mac 用户只需要安装Docker

Getting Started

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

cd docker-php

composer install
 
docker-compose up -d

现在你可以在浏览器中打开http://127.0.0.1:3000/

Docker-compose

  • docker-compose stop

停止所有服务

  • docker-compose start

启动所有服务

  • docker-compose restart

重启所有服务

  • docker-compose restart mysql

重启mysql服务

Configure PHP

  • PHP包含那些扩展?

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

  • 怎么改变Nginx监听的端口?

你可以在项目的根目录找到.env文件,修改NGINX_PORT的值

Configure MySQL

  • 怎么改变MySQL的用户名密码,初始化数据库 ?

可以在docker/mysql/mysql.env文件中修改这些值

Configure Redis

请阅读官方文档

Configure MongoDB

请阅读官方文档