GithubHelp home page GithubHelp logo

develop's Introduction

使用docker搭建PHP开发环境

目录和文件说明

  • apps 自定义的应用镜像目录
  • config 本地的一些自定义配置
  • data 数据目录,用来存放持久化的数据,如 mysql 的数据文件
  • htdocs web程序代码目录
  • logs 日志目录,用来保存 nginx、php 等应用产生的日志

安装

docker安装见https://www.docker.com/products/overview

启动

进入项目目录develop。

前台运行:

$ docker-compose up

后台运行:

$ docker-compose up -d

关闭:

$ docker-compose down

xdebug配置

由于在容器里面无法直接获取到宿主机的IP地址。因此在如果要使用xdebug调试的话需要配置在宿主机(物理机)上配置一个名为XDEBUG_HOST的环境变量,docker-compose在启动时将读取这个变量并写入到容器中的xdebug配置文件里:

$ export XDEBUG_HOST=192.168.1.2

develop's People

Contributors

lisijie avatar

Watchers

James Cloos avatar li fuqiang 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.