docker-compose.yml 文件保留

version: "3"

services:

  nginx:

    restart: always

    image: nginx

    ports:

      - 8000:80

    volumes:

      - ./log/nginx:/var/log/nginx

      - ./project:/var/www

      - ./config/nginx/nginx.conf:/etc/nginx/nginx.conf 

    networks:

      - web

  php:

    image: php_php:latest

    tty: true

    #ports:

    #  - 9000:9000

    volumes:

      - ./config/php-fpm:/usr/local/php/etc

      - ./project:/var/www

      - ./log/php:/usr/local/php/var/log

    restart: always

    networks:

      - web

  mysql:

    image: mysql:5.5

    #build:

    #  context: .

    #  dockerfile: "Dockerfile"

    environment:

      MYSQL_ROOT_PASSWORD: "123456"

      MYSQL_DATABASE: db_ljlj

      MYSQL_USER: mis

      MYSQL_PASSWORD: "123456"

    restart: always

    volumes:

      - ./mysql_data:/var/lib/mysql

      - ./config/mysql/my.cnf:/etc/mysql/my.cnf

      - ./sql:/sql

      - ./log/mysql:/var/lib/mysql/log

    networks:

      - web

  tomcat:

    image: tomcat7:jdk8

    restart: always

    ports:

      - 8081:8080

    volumes:

      - ./tomcat-webapps:/usr/local/tomcat/webapps

      - ./config/tomcat/server.xml:/usr/local/tomcat/conf/server.xml

      - ./log/tomcat:/usr/local/tomcat/logs 

    networks:

      - web

networks:

  web: 

你可能感兴趣的:(docker-compose.yml 文件保留)