修改了发版配置
This commit is contained in:
parent
d619f13664
commit
b20b15c790
50
Dockerfile.prod
Normal file
50
Dockerfile.prod
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# 第一阶段:使用 Maven + Java8 构建 JAR 包
|
||||||
|
FROM maven:3.9.2-eclipse-temurin-8-alpine AS builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# 添加国内 Maven 镜像源
|
||||||
|
RUN mkdir -p /root/.m2 && \
|
||||||
|
echo '<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" \
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 \
|
||||||
|
https://maven.apache.org/xsd/settings-1.0.0.xsd"> \
|
||||||
|
<mirrors> \
|
||||||
|
<mirror> \
|
||||||
|
<id>aliyun</id> \
|
||||||
|
<mirrorOf>*</mirrorOf> \
|
||||||
|
<name>aliyun maven</name> \
|
||||||
|
<url>https://maven.aliyun.com/repository/public</url> \
|
||||||
|
</mirror> \
|
||||||
|
</mirrors> \
|
||||||
|
</settings>' > /root/.m2/settings.xml
|
||||||
|
|
||||||
|
# 复制项目代码
|
||||||
|
COPY pom.xml .
|
||||||
|
COPY sa-admin ./sa-admin
|
||||||
|
COPY sa-common ./sa-common
|
||||||
|
|
||||||
|
# 构建项目
|
||||||
|
RUN mvn clean package -Dmaven.test.skip=true -P prod
|
||||||
|
|
||||||
|
# 第二阶段:使用更小的 Java8 JDK 镜像运行
|
||||||
|
FROM eclipse-temurin:8-jdk-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# ✅ 安装字体 & libgcc 等依赖
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
libstdc++ \
|
||||||
|
libgcc \
|
||||||
|
fontconfig \
|
||||||
|
freetype \
|
||||||
|
ttf-dejavu
|
||||||
|
|
||||||
|
# 复制构建产物
|
||||||
|
COPY --from=builder /app/sa-admin/target/*.jar app.jar
|
||||||
|
|
||||||
|
# 暴露端口(请替换成你实际应用端口)
|
||||||
|
EXPOSE 5477
|
||||||
|
|
||||||
|
# 启动应用
|
||||||
|
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||||
@ -4,7 +4,7 @@ server:
|
|||||||
port: 7001
|
port: 7001
|
||||||
# tomcat 配置,主要用于 配置 访问日志(便于将来排查错误)
|
# tomcat 配置,主要用于 配置 访问日志(便于将来排查错误)
|
||||||
tomcat:
|
tomcat:
|
||||||
basedir: ${localPath:/home}/logs/smart_admin_v2/pre/tomcat-logs
|
basedir: ./logs/smart_admin_v2/pre/tomcat-logs
|
||||||
accesslog:
|
accesslog:
|
||||||
enabled: true
|
enabled: true
|
||||||
pattern: '%t %{X-Forwarded-For}i %a "%r" %s %D (%D ms)'
|
pattern: '%t %{X-Forwarded-For}i %a "%r" %s %D (%D ms)'
|
||||||
@ -12,6 +12,13 @@ server:
|
|||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: '@profiles.active@'
|
active: '@profiles.active@'
|
||||||
|
data:
|
||||||
|
redis:
|
||||||
|
host: '139.155.127.177'
|
||||||
|
port: 30002
|
||||||
|
password: gdxz2022&dj.
|
||||||
|
database: 12
|
||||||
|
timeout: 3000
|
||||||
|
|
||||||
# 项目配置
|
# 项目配置
|
||||||
project:
|
project:
|
||||||
@ -39,3 +46,25 @@ igandan:
|
|||||||
platform: case
|
platform: case
|
||||||
doc:
|
doc:
|
||||||
host: https://doc.igandan.com/app/
|
host: https://doc.igandan.com/app/
|
||||||
|
|
||||||
|
fxq:
|
||||||
|
client-id: Md7w4eaZih
|
||||||
|
client-secret: 97acf8ebb09641cbb90accf06e74ccf5
|
||||||
|
client-url: https://saasapi.fangxinqian.cn/openapi/v2/
|
||||||
|
|
||||||
|
baiduce:
|
||||||
|
app-id: 119377580
|
||||||
|
app-key: 2YFRnP3ryU8IP0IqbqybTu6u
|
||||||
|
app-secret: Zw8pTeM1ovys7kOsNUlElOc6jBi6zsFU
|
||||||
|
|
||||||
|
# json序列化相关配置
|
||||||
|
jackson:
|
||||||
|
serialization:
|
||||||
|
write-enums-using-to-string: true
|
||||||
|
write-dates-as-timestamps: false
|
||||||
|
deserialization:
|
||||||
|
read-enums-using-to-string: true
|
||||||
|
fail-on-unknown-properties: false
|
||||||
|
default-property-inclusion: always
|
||||||
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
|
time-zone: GMT+8
|
||||||
@ -5,7 +5,7 @@
|
|||||||
-->
|
-->
|
||||||
<Configuration status="INFO" monitorInterval="30">
|
<Configuration status="INFO" monitorInterval="30">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="log-path">$${env:localPath:-/home}/logs/smart_admin_v2/pre</Property>
|
<Property name="log-path">./logs/smart_admin_v2/pre</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Appenders>
|
<Appenders>
|
||||||
<Console name="Console" target="SYSTEM_OUT">
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
|||||||
18
sa-admin/src/main/resources/pre/spy.properties
Normal file
18
sa-admin/src/main/resources/pre/spy.properties
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#相关的包
|
||||||
|
modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory
|
||||||
|
# 日志格式
|
||||||
|
logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
|
||||||
|
#日志输出到控制台
|
||||||
|
appender=com.p6spy.engine.spy.appender.StdoutLogger
|
||||||
|
# 设置 p6spy driver 代理
|
||||||
|
deregisterdrivers=true
|
||||||
|
# 取消JDBC URL前缀
|
||||||
|
useprefix=true
|
||||||
|
# 配置记录 Log 例外,可去掉的结果集有error,info,batch,debug,statement,commit,rollback,result,resultset.
|
||||||
|
excludecategories=info,debug,result,commit,resultset
|
||||||
|
# 日期格式
|
||||||
|
dateformat=yyyy-MM-dd HH:mm:ss
|
||||||
|
# 开启慢sql
|
||||||
|
outagedetection=true
|
||||||
|
# 慢SQL记录标准(单位秒)
|
||||||
|
outagedetectioninterval=2
|
||||||
@ -6,6 +6,13 @@ server:
|
|||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: '@profiles.active@'
|
active: '@profiles.active@'
|
||||||
|
data:
|
||||||
|
redis:
|
||||||
|
host: '139.155.127.177'
|
||||||
|
port: 30002
|
||||||
|
password: gdxz2022&dj.
|
||||||
|
database: 12
|
||||||
|
timeout: 3000
|
||||||
|
|
||||||
# 项目配置
|
# 项目配置
|
||||||
project:
|
project:
|
||||||
@ -33,3 +40,25 @@ igandan:
|
|||||||
platform: case
|
platform: case
|
||||||
doc:
|
doc:
|
||||||
host: https://doc.igandan.com/app/
|
host: https://doc.igandan.com/app/
|
||||||
|
|
||||||
|
fxq:
|
||||||
|
client-id: Md7w4eaZih
|
||||||
|
client-secret: 97acf8ebb09641cbb90accf06e74ccf5
|
||||||
|
client-url: https://saasapi.fangxinqian.cn/openapi/v2/
|
||||||
|
|
||||||
|
baiduce:
|
||||||
|
app-id: 119377580
|
||||||
|
app-key: 2YFRnP3ryU8IP0IqbqybTu6u
|
||||||
|
app-secret: Zw8pTeM1ovys7kOsNUlElOc6jBi6zsFU
|
||||||
|
|
||||||
|
# json序列化相关配置
|
||||||
|
jackson:
|
||||||
|
serialization:
|
||||||
|
write-enums-using-to-string: true
|
||||||
|
write-dates-as-timestamps: false
|
||||||
|
deserialization:
|
||||||
|
read-enums-using-to-string: true
|
||||||
|
fail-on-unknown-properties: false
|
||||||
|
default-property-inclusion: always
|
||||||
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
|
time-zone: GMT+8
|
||||||
@ -5,7 +5,7 @@
|
|||||||
-->
|
-->
|
||||||
<Configuration status="INFO" monitorInterval="30">
|
<Configuration status="INFO" monitorInterval="30">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="log-path">/web/medical-case/logs/case_admin/prod</Property>
|
<Property name="log-path">./logs/smart_admin_v2/prod</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Appenders>
|
<Appenders>
|
||||||
<Console name="Console" target="SYSTEM_OUT">
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
|||||||
18
sa-admin/src/main/resources/prod/spy.properties
Normal file
18
sa-admin/src/main/resources/prod/spy.properties
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#相关的包
|
||||||
|
modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory
|
||||||
|
# 日志格式
|
||||||
|
logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
|
||||||
|
#日志输出到控制台
|
||||||
|
appender=com.p6spy.engine.spy.appender.StdoutLogger
|
||||||
|
# 设置 p6spy driver 代理
|
||||||
|
deregisterdrivers=true
|
||||||
|
# 取消JDBC URL前缀
|
||||||
|
useprefix=true
|
||||||
|
# 配置记录 Log 例外,可去掉的结果集有error,info,batch,debug,statement,commit,rollback,result,resultset.
|
||||||
|
excludecategories=info,debug,result,commit,resultset
|
||||||
|
# 日期格式
|
||||||
|
dateformat=yyyy-MM-dd HH:mm:ss
|
||||||
|
# 开启慢sql
|
||||||
|
outagedetection=true
|
||||||
|
# 慢SQL记录标准(单位秒)
|
||||||
|
outagedetectioninterval=2
|
||||||
Loading…
x
Reference in New Issue
Block a user