From 13fe79f7cec89f174fe980187486823218996293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=AF=E6=B4=81=E7=9A=84=E5=BE=AE=E7=AC=91?= Date: Mon, 26 Mar 2018 17:17:54 +0800 Subject: [PATCH] m --- docker-compose.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8014af29..a98b10b0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,9 @@ services: - 80:80 - 443:443 volumes: - - ./nginx/conf.d:/etc/nginx/conf.d + - ./nginx/conf.d:/etc/nginx/conf.d + - /tmp/logs:/var/log/nginx + mysql: build: ./mysql @@ -16,8 +18,11 @@ services: MYSQL_DATABASE: favorites MYSQL_ROOT_PASSWORD: root MYSQL_ROOT_HOST: '%' + TZ: Asia/Shanghai ports: - "3306:3306" + volumes: + - ./mysql_data:/var/lib/mysql restart: always app: @@ -27,11 +32,10 @@ services: volumes: - ./app:/app - ~/.m2:/root/.m2 + - /tmp/logs:/usr/local/logs expose: - "8080" command: mvn clean spring-boot:run -Drun.profiles=docker depends_on: - nginx - - mysql - environment: - MYSQL_DATABASE: favorites + - mysql \ No newline at end of file