This commit is contained in:
xzh
2025-07-22 20:16:19 +08:00
parent 8c53fa9479
commit 5cfc12adae
9 changed files with 47 additions and 26 deletions

View File

@@ -5,26 +5,27 @@ FROM bellsoft/liberica-openjdk-debian:17.0.11-cds
LABEL maintainer="Lion Li"
RUN mkdir -p /ruoyi/server/logs \
/ruoyi/server/temp \
/ruoyi/skywalking/agent
RUN mkdir -p /giftBook/server/logs \
/giftBook/server/temp \
/giftBook/skywalking/agent
WORKDIR /ruoyi/server
WORKDIR /giftBook/server
ENV SERVER_PORT=8080 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""
ENV SERVER_PORT=8080 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS="--spring.profiles.active=prod"
EXPOSE ${SERVER_PORT}
ADD ./target/ruoyi-admin.jar ./app.jar
ADD ./target/giftBook-admin.jar ./app.jar
# 工作流字体文件
ADD ./zhFonts/ /usr/share/fonts/zhFonts/
SHELL ["/bin/bash", "-c"]
ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \
ENTRYPOINT exec java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \
# 应用名称 如果想区分集群节点监控 改成不同的名称即可
#-Dskywalking.agent.service_name=ruoyi-server \
#-javaagent:/ruoyi/skywalking/agent/skywalking-agent.jar \
-XX:+HeapDumpOnOutOfMemoryError -XX:+UseZGC ${JAVA_OPTS} \
-jar app.jar
#-Dskywalking.agent.service_name=giftBook-server \
#-javaagent:/giftBook/skywalking/agent/skywalking-agent.jar \
-XX:+HeapDumpOnOutOfMemoryError -XX:+UseZGC \
-jar app.jar \
${JAVA_OPTS}

View File

@@ -52,9 +52,9 @@ spring:
driverClassName: com.mysql.cj.jdbc.Driver
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: root
password: root
url: jdbc:mysql://10.10.10.7:3306/gift_book?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
username: giftBook
password: giftBook
# # 从库数据源
# slave:
# lazy: true
@@ -101,13 +101,13 @@ spring:
spring.data:
redis:
# 地址
host: localhost
host: 10.10.10.7
# 端口默认为6379
port: 6379
# 数据库索引
database: 0
# redis 密码必须配置
password: ruoyi123
password: 520Xzh...
# 连接超时时间
timeout: 10s
# 是否开启ssl