docker 打包&生产配置
This commit is contained in:
8
Dockerfile
Normal file
8
Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM java:8
|
||||
|
||||
ADD target/quinn-0.0.1-SNAPSHOT.jar /home/monitor-3.1.5.jar
|
||||
ADD run.sh /home
|
||||
|
||||
EXPOSE 8088
|
||||
|
||||
ENTRYPOINT [ "sh", "/home/run.sh" ]
|
||||
15
buildImage
Normal file
15
buildImage
Normal file
@@ -0,0 +1,15 @@
|
||||
-- 修改docker镜像为阿里云镜像 docker-engine增加
|
||||
"registry-mirrors": [
|
||||
"https://6kx4zyno.mirror.aliyuncs.com"
|
||||
]
|
||||
-- 编译docker镜像
|
||||
docker build -t monitor/centos .
|
||||
|
||||
-- 导出docker镜像
|
||||
docker save monitor/centos > monitor.tar
|
||||
|
||||
-- 导入docker镜像
|
||||
docker load --input monitor.tar
|
||||
|
||||
-- 运行docekr镜像
|
||||
docker run -p 8088:8088 -d monitor/centos:latest
|
||||
@@ -1,4 +1,4 @@
|
||||
server.port=8080
|
||||
server.port=8088
|
||||
|
||||
spring.thymeleaf.cache=true
|
||||
|
||||
@@ -6,9 +6,9 @@ spring.thymeleaf.cache=true
|
||||
swagger.enable=false
|
||||
|
||||
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
spring.datasource.url=jdbc:mysql://localhost:3306/quinn?useUnicode=true&characterEncoding=utf8&useSSL=false
|
||||
spring.datasource.url=jdbc:mysql://localhost:3306/smallapp_point?useUnicode=true&characterEncoding=utf8&useSSL=false
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=123456
|
||||
spring.datasource.password=hyty1234
|
||||
|
||||
# mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
mybatis-plus.mapper-locations=classpath*:com/quinn/mapper/xml/*.xml
|
||||
|
||||
Reference in New Issue
Block a user