refactor(admin): 重构开发环境配置并添加 Docker 支持
- 修改应用端口为 18080 - 更新数据库配置,使用加密凭据 - 调整 Redis 配置 - 添加 Jasypt 加密器配置 - 新增 Dockerfile 用于构建 Docker 镜像 - 更新 Maven 依赖,添加 Jasypt 支持
This commit is contained in:
parent
4e9ab30d68
commit
0bb060b273
8
Dockerfile
Normal file
8
Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM amazoncorretto:17
|
||||
ADD agileboot-admin/target/agileboot-admin-1.0.0.jar /agileboot-admin.jar
|
||||
|
||||
EXPOSE 18080
|
||||
#ENV CONTEXT_PATH /
|
||||
# ENV NACOS_ENABLED true
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
|
||||
ENTRYPOINT ["java", "-jar", "/agileboot-admin.jar"]
|
||||
@ -50,25 +50,21 @@ spring:
|
||||
datasource:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://localhost:33067/agileboot-pure?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: 12345
|
||||
url: jdbc:mysql://mysql2.sqlpub.com:3307/agileboot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&sslMode=REQUIRED
|
||||
username: ENC(s4kjpEsplGGLeV3YRNvJpJhDSOAO0tEf)
|
||||
password: ENC(hg/hxmducWsI8u83/eXgAi8yHBDFbB5z0xzwNtBejPc=)
|
||||
# 从库数据源
|
||||
# slave:
|
||||
# url: jdbc:mysql://localhost:33067/agileboot2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
# password: 12345
|
||||
# slave:
|
||||
# url: jdbc:mysql://localhost:33067/agileboot2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
# password: 12345
|
||||
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: localhost
|
||||
# 端口,默认为6379
|
||||
port: 36379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码
|
||||
password: 12345
|
||||
host: redis
|
||||
port: 6379
|
||||
database: 1
|
||||
password: ENC(s3HU866TUAjzrWStN7kpQQ==)
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
@ -84,7 +80,7 @@ spring:
|
||||
|
||||
logging:
|
||||
file:
|
||||
path: D:/logs/agileboot-dev
|
||||
path: ./logs/agileboot-dev
|
||||
|
||||
|
||||
springdoc:
|
||||
@ -103,3 +99,6 @@ agileboot:
|
||||
# 前端url请求转发前缀
|
||||
api-prefix: /dev-api
|
||||
demo-enabled: false
|
||||
jasypt:
|
||||
encryptor:
|
||||
password: ${JASYPT_ENCRYPTOR_PASSWORD:}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
port: 8080
|
||||
port: 18080
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
|
||||
@ -177,6 +177,13 @@
|
||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--ENC加密-->
|
||||
<dependency>
|
||||
<groupId>com.github.ulisesbocchio</groupId>
|
||||
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||
<version>2.1.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- swagger注解 -->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user