Skip to content

Commit

Permalink
docker修改
Browse files Browse the repository at this point in the history
  • Loading branch information
langhsu authored and xulang committed Feb 13, 2019
1 parent 2fe8e4e commit cc9dfb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM maven:3.5.4-jdk-8
MAINTAINER mtons

ENV TZ=Asia/Shanghai db_u="root" db_pwd="root"
ENV TZ=Asia/Shanghai
RUN mkdir /app && ln -sf /usr/share/zoneinfo/{TZ} /etc/localtime && echo "{TZ}" > /etc/timezone

WORKDIR /app

ADD mblog-latest.jar mblog-latest.jar
ENTRYPOINT ["java", "-jar", "/app/mblog-latest.jar", "--spring.datasource.username=${db_u}","--spring.datasource.password=${db_pwd}"]
ENTRYPOINT ["java", "-jar", "/app/mblog-latest.jar"]
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ services:
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_HOST: '%'
TZ: Asia/Shanghai
ports:
- "3306:3306"
expose:
- "3306"
volumes:
Expand All @@ -26,7 +28,7 @@ services:
- ./logs:/app/logs
ports:
- "80:8080"
command: mvn clean spring-boot:run -Dspring-boot.run.profiles=mysql -Dmaven.test.skip=true
#command: mvn clean spring-boot:run -Dspring-boot.run.profiles=mysql -Dmaven.test.skip=true
depends_on:
- mysql
restart: always

0 comments on commit cc9dfb7

Please sign in to comment.