### docker-compose:lnmp+redis+mongo服务,php加载扩展,直接复制下方代码即可
```
version: '3.7'
services:
# mysql:
# build: mysql
# image: lnmp/mysql
# container_name: lnmp_mysql
# command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci
# restart: always
# env_file: ./.mysql.env
# logging:
# driver: 'json-file'
# options:
# max-size: '5g'
# volumes:
# - ${PWD}/mysql/conf/:/etc/mysql/:ro
# - ${PWD}/mysql/data/:/var/lib/mysql/:rw
# - ${PWD}/mysql/log/:/var/log/mysql/:rw
# ports:
# - ${MYSQL_PORT}:3306
# redis:
# build: redis
# image: lnmp/redis
# container_name: lnmp_redis
# restart: always
# command: redis-server /etc/redis/redis.conf
# logging:
# driver: 'json-file'
# options:
# max-size: '1g'
# volumes:
# - ${PWD}/redis/conf/redis.${APP_ENV}.conf:/etc/redis/redis.conf:ro
# - ${PWD}/redis/data/:/data/:rw
# ports:
# - ${REDIS_PORT}:6379
# mongo:
# build: mongo
# image: lnmp/mongo
# container_name: lnmp_mongo
# restart: always
# command: mongod
# env_file: ./.mongo.env
# logging:
# driver: 'json-file'
# options:
# max-size: '1g'
# volumes:
# - ${PWD}/mongo/config/mongod.${APP_ENV}.conf:/etc/mongod.conf:ro
# - ${PWD}/mongo/configdb:/data/configdb:rw
# - ${PWD}/mongo/db:/data/db:rw
# ports:
# - ${MONGO_PORT}:27017
php:
build:
context: ${PWD}/php
image: lnmp/php
container_name: lnmp_php
# links:
# - mysql:mysql
# - redis:redis
# - mongo:mongo
restart: always
command: php-fpm
logging:
driver: 'json-file'
options:
max-size: '10g'
volumes:
- ${HTML_PATH}:/workspace/html/:rw
- ${PWD}/php/conf/php-fpm.conf:/usr/local/etc/php-fpm.conf:ro
- ${PWD}/php/conf/php.${APP_ENV}.ini:/usr/local/etc/php/php.ini:ro
- ${PWD}/php/log/:/var/log/php-fpm/:rw
- ${PWD}/php/php-fpm.d/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
- ${PWD}/php/supervisor/conf/:/etc/supervisor/:ro
- ${PWD}/php/supervisor/log/:/var/log/supervisor/:rw
ports:
- ${PHP_PORT}:9000
nginx:
build: nginx
image: lnmp/nginx
container_name: lnmp_nginx
depends_on:
- php
links:
- php:php
restart: always
logging:
driver: 'json-file'
options:
max-size: '10g'
volumes:
- ${HTML_PATH}:/workspace/html/:rw
- ${PWD}/nginx/conf/nginx.${APP_ENV}.conf:/etc/nginx/nginx.conf:ro
- ${PWD}/nginx/conf.d:/etc/nginx/conf.d/:ro
- ${PWD}/nginx/log:/var/log/nginx/:rw
ports:
- ${HTTP_PORT}:80
- ${HTTPS_PORT}:443
```
- Docker容器化部署使用说明书
- 环境部署
- Windows系统
- Windows部署Docker
- 安装过程可能碰到的问题总结
- Docker部署环境
- Docker hub操作
- Docker 部署 laravel5.5问题总结
- Docker处理中文乱码问题
- Linux系统
- Centos7.2部署Docker
- Linux部署Docker准备前工作
- 部署docker问题总结
- Linux部署Docker粗略笔记
- 安装git
- Docker命令大全
- 问题
- php7.4 安装xlswriter扩展
- php7.2 DockerFile文件
- dockerFile和docker-composer区别
- docker-compose的使用
- docker-compose的使用问题总结
- docker-compose
- Windows系统
- docker-compose.yml编写
- nginx目录如下
- conf.d
- default.conf
- nginx.conf
- php目录如下
- Dockerfile
- redis目录如下
- redis.conf
- docker-compose使用说明
- Linux系统
- /workspace/html/config_dev
- html
- index.html
- index.php
- nginx
- conf
- nginx.production.conf
- conf.d
- default.conf
- log
- access.log
- error.log
- Dockerfile
- php
- conf
- php.production.ini
- php-fpm.conf
- log(目录)
- php-fpm.d
- www.conf
- supervisor
- conf
- log
- Dockerfile
- .env
- docker-compose.yml