问答详情
源自:6-3 compose实战

docker-compose.yml文件可以提供一下吗?谢谢!

docker-compose.yml文件可以提供一下吗?谢谢!

提问者:Findyourself 2018-01-09 17:28

个回答

  • 慕工程5463199
    2018-01-12 10:36:31

    version: '2'


    networks:

      ghost:


    services:

      ghost-app:

        build: ghost

        networks:

          - ghost

        depends_on:

          - db

        ports:

          - "2368:2368"

      nginx:

        build: nginx

        networks:

          - ghost

        depends_on:

          - ghost-app

        ports:

          - "80:80"


      db:

        image: "mysql:5.7.15"

        networks:

          - ghost

        environment:

          MYSQL_ROOT_PASSWORD: mysqlroot

          MYSQL_USER: ghost

          MYSQL_PASSWORD: ghost

        volumes:

          - $PWD/data:/var/libmysql

        ports:

          - "3306:3306"