dockerfile打包

master
DongZeLiang 2024-04-24 15:06:18 +08:00
parent 22498a253d
commit 932df1698b
3 changed files with 23 additions and 4 deletions

19
Dockerfile 100644
View File

@ -0,0 +1,19 @@
FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/openjdk:17-8.6
LABEL authors="muyu"
#定义时区参数
ENV TZ=Asia/Shanghai
#设置时区
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
# 定义工作目录
RUN mkdir -p /home/app
# 定义镜像落脚点
WORKDIR /home/app
# 拷贝jar包
COPY ./ruoyi-application/target/ruoyi-application.jar /home/app/app.jar
# 执行
CMD ["java", "-jar", "-Dfile.encoding=utf8", "/home/app/app.jar", "--spring.profiles.active=test"]

View File

@ -35,7 +35,7 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://localhost:3306/vue-server?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mysql://localhost:3306/etl-server?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: root
# 从库数据源

View File

@ -10,7 +10,7 @@ spring:
# redis 配置
redis:
# 地址
host: localhost
host: redis
# 端口默认为6379
port: 6379
# 数据库索引
@ -35,9 +35,9 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mysql://mysql:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: password
password: root
# 从库数据源
slave:
# 从数据源开关/默认关闭