• docker-compose.yaml


    version: "3.8"
    services:
    redis:
    container_name: redis
    image: redis:alpine3.8
    ports:
    - "6379:6379"
    volumes:
    - /Users/chen.yuhao/Desktop/lnmp/redis/redis.conf:/usr/local/redis/redis.conf:ro
    - /Users/chen.yuhao/Desktop/lnmp/redis/data:/data
    environment:
    - TZ=Asia/Shanghai # 设置时区
    command:
    redis-server /usr/local/redis/redis.conf --appendonly yes
    networks:
    - frontend

    mysql:
    container_name: mysql
    image: mysql:5.7
    ports:
    - "3306:3306"
    command: --default-authentication-plugin=mysql_native_password
    environment:
    MYSQL_ROOT_PASSWORD: 123456
    volumes:
    - /Users/chen.yuhao/Desktop/lnmp/mysql/data:/var/lib/mysql
    - /Users/chen.yuhao/Desktop/lnmp/mysql/conf.d:/etc/mysql/conf.d
    networks:
    - backend

    php:
    container_name: php
    image: php:5.6
    ports:
    - "9000:9000"
    volumes:
    - /Users/chen.yuhao/Desktop/lnmp/php/php-fpm.conf:/usr/local/etc/php-fpm.conf:ro
    - /Users/chen.yuhao/Desktop/lnmp/php/conf.d:/usr/local/etc/php-fpm/php-fpm.d
    - /Users/chen.yuhao/Desktop/lnmp/www/html/:/home/
    - /Users/chen.yuhao/Desktop/lnmp/php/php.ini:/usr/local/etc/php/php.ini
    environment:
    - TZ=Asia/Shanghai # 设置时区
    networks:
    - frontend
    - backend
    links:
    - redis
    - mysql
    nginx:
    container_name: nginx
    ports:
    - "80:80"
    - "443:443"
    image: nginx
    environment:
    - TZ=Asia/Shanghai
    volumes:
    - /Users/chen.yuhao/Desktop/lnmp/nginx/conf/nginx.conf:/etc/nginx/nginx.conf:ro
    - /Users/chen.yuhao/Desktop/lnmp/nginx/conf/conf.d:/etc/nginx/conf.d
    - /Users/chen.yuhao/Desktop/lnmp/nginx/html:/usr/share/nginx/html
    - /Users/chen.yuhao/Desktop/lnmp/www/html/:/home/
    networks:
    - frontend
    links:
    - php

    networks:
    frontend:
    backend:

    volumes:
    db-data:

  • 相关阅读:
    微信小游戏5.2.2 在子项目中使用EUI制作排行榜报错 wx.getFileSystemManager not function
    Egret5.2.2 微信小游戏行的示例排行榜
    Python翻译
    Python-docx库的使用
    用百度文字识别实现图片文本识别
    基于airtest的朋友圈自动点赞
    使用豆瓣源安装python包
    Appium 环境配置遇到的坑
    使用Pyppeteer进行gmail模拟登录
    异步爬虫
  • 原文地址:https://www.cnblogs.com/-cyh/p/14743891.html
Copyright © 2020-2023  润新知