Code Monkey home page Code Monkey logo

docker_lnmp's Introduction

WEBROOT

  • mkdir /wwwroot

Clone code

  • cd /wwwroot
  • git clone xxxx
  • cd xxxx
  • composer install -vvv
  • chmod -R 777 storage
  • cp .env.example .env
  • php artisan key:generate

Nginx + PHP-FPM + MYSQL

  • docker pull nginx
  • docker pull php:7.3.9-fpm
  • docker pull mysql:5.7.27

Build from Dockerfile

启动MySQL

  • cd mysql
  • docker build -t fah-mysql .
  • docker run --name mysql -p 3306:3306 -v /wwwroot/mysql_data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=fah_xxoo_2019+- -d fah-mysql
  • 测试 mysql -h127.0.0.1 -uroot -pfah_xxoo_2019+-

启动PHP-FPM

  • cd fpm
  • docker build -t fah-fpm .
  • docker run --name php-fpm --link mysql -d -v /wwwroot:/wwwroot fah-fpm

启动Nginx容器

  • docker build -t fah-nginx .
  • docker run --name nginx --link php-fpm -d -p 80:80 -v /wwwroot:/wwwroot fah-nginx

docker_lnmp's People

Contributors

dantinr avatar

Watchers

 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.