Compare commits
2 Commits
cfd1f7a492
...
2017507dec
Author | SHA1 | Date | |
---|---|---|---|
2017507dec | |||
388199279a |
@@ -118,11 +118,11 @@ jobs:
|
|||||||
|
|
||||||
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
|
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
|
||||||
# 使用正确的端口 (8443) 和协议 (HTTPS),不跳过SSL验证
|
# 使用正确的端口 (8443) 和协议 (HTTPS),不跳过SSL验证
|
||||||
if curl -f -s https://localhost:8443/actuator/health > /dev/null 2>&1; then
|
if curl -f -s https://www.doubleyin.cn:8443/actuator/health > /dev/null 2>&1; then
|
||||||
echo "✅ 应用健康检查通过"
|
echo "✅ 应用健康检查通过"
|
||||||
|
|
||||||
# 获取详细的健康信息
|
# 获取详细的健康信息
|
||||||
HEALTH_INFO=$(curl -s https://localhost:8443/actuator/health)
|
HEALTH_INFO=$(curl -s https://www.doubleyin.cn:8443/actuator/health)
|
||||||
echo "健康状态: $HEALTH_INFO"
|
echo "健康状态: $HEALTH_INFO"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
@@ -7,7 +7,7 @@ services:
|
|||||||
container_name: light-delivery-container
|
container_name: light-delivery-container
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
- "8443:8443"
|
- "8443:443" # 修改这行,将宿主机8443端口映射到容器443端口
|
||||||
environment:
|
environment:
|
||||||
- SPRING_DATASOURCE_PASSWORD=Hu@ng1998!
|
- SPRING_DATASOURCE_PASSWORD=Hu@ng1998!
|
||||||
- KEY_STORE_PASSWORD=k7cP6QLgJDkX
|
- KEY_STORE_PASSWORD=k7cP6QLgJDkX
|
||||||
@@ -23,11 +23,11 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- light-network
|
- light-network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "https://localhost:8443/actuator/health", "--insecure"]
|
test: ["CMD", "wget", "--no-check-certificate", "-qO-", "https://localhost:443/actuator/health"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 60s
|
start_period: 40s
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
light-network:
|
light-network:
|
||||||
|
16
pom.xml
16
pom.xml
@@ -119,6 +119,12 @@
|
|||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- ========== Actuator for Health Check ========== -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- ========== Test Dependencies ========== -->
|
<!-- ========== Test Dependencies ========== -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
@@ -163,6 +169,16 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<!-- 添加资源插件以确保正确处理UTF-8编码 -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>3.3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<!-- Jib Docker Plugin -->
|
<!-- Jib Docker Plugin -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.google.cloud.tools</groupId>
|
<groupId>com.google.cloud.tools</groupId>
|
||||||
|
@@ -1,45 +1,38 @@
|
|||||||
spring.application.name=Light
|
spring.application.name=Light
|
||||||
# æå¡å¨ç«¯å£é
ç½®
|
|
||||||
server.port=443
|
server.port=443
|
||||||
|
|
||||||
# SSLé
ç½®
|
|
||||||
server.ssl.key-store-type=JKS
|
server.ssl.key-store-type=JKS
|
||||||
server.ssl.key-store=/etc/ssl/certs/www.doubleyin.cn.jks
|
server.ssl.key-store=/etc/ssl/certs/www.doubleyin.cn.jks
|
||||||
server.ssl.key-store-password=${KEY_STORE_PASSWORD}
|
server.ssl.key-store-password=${KEY_STORE_PASSWORD}
|
||||||
|
|
||||||
# --- MySQL Database Configuration (Remote Server) ---
|
|
||||||
spring.datasource.url=jdbc:mysql://115.190.121.151:3306/light_delivery?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
spring.datasource.url=jdbc:mysql://115.190.121.151:3306/light_delivery?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
||||||
spring.datasource.username=double
|
spring.datasource.username=double
|
||||||
spring.datasource.password=Hu@ng1998!
|
spring.datasource.password=Hu@ng1998!
|
||||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||||
|
|
||||||
# JPA / Hibernate Settings
|
|
||||||
spring.jpa.hibernate.ddl-auto=update
|
spring.jpa.hibernate.ddl-auto=update
|
||||||
spring.jpa.show-sql=true
|
spring.jpa.show-sql=true
|
||||||
spring.jpa.properties.hibernate.format_sql=true
|
spring.jpa.properties.hibernate.format_sql=true
|
||||||
# For MySQL
|
|
||||||
spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect
|
spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect
|
||||||
|
|
||||||
# HikariCP Connection Pool Settings
|
|
||||||
spring.datasource.hikari.maximum-pool-size=10
|
spring.datasource.hikari.maximum-pool-size=10
|
||||||
spring.datasource.hikari.minimum-idle=2
|
spring.datasource.hikari.minimum-idle=2
|
||||||
spring.datasource.hikari.connection-timeout=30000
|
spring.datasource.hikari.connection-timeout=30000
|
||||||
spring.datasource.hikari.idle-timeout=600000
|
spring.datasource.hikari.idle-timeout=600000
|
||||||
spring.datasource.hikari.max-lifetime=1800000
|
spring.datasource.hikari.max-lifetime=1800000
|
||||||
|
|
||||||
# ------ WeChat Configuration ------
|
|
||||||
wx.appId=wx1b790fd953ac27bf
|
wx.appId=wx1b790fd953ac27bf
|
||||||
wx.secret=b38c40c89cc4954472fb45d1e7cc27a4
|
wx.secret=b38c40c89cc4954472fb45d1e7cc27a4
|
||||||
wx.token=huang1998
|
wx.token=huang1998
|
||||||
wx.aesKey=lwararkj1BgurX8Qown6yjGNsqd8dEIEddDnYN3iLgc
|
wx.aesKey=lwararkj1BgurX8Qown6yjGNsqd8dEIEddDnYN3iLgc
|
||||||
|
|
||||||
# WeChat API URLs
|
|
||||||
wx.api.access-token-url=https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential
|
wx.api.access-token-url=https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential
|
||||||
wx.api.code2session-url=https://api.weixin.qq.com/sns/jscode2session
|
wx.api.code2session-url=https://api.weixin.qq.com/sns/jscode2session
|
||||||
|
|
||||||
# Logging Configuration
|
|
||||||
logging.level.com.light.delivery=INFO
|
logging.level.com.light.delivery=INFO
|
||||||
|
|
||||||
# JWT Configuration
|
|
||||||
jwt.secret=lightDeliveryProdSecretKey
|
jwt.secret=lightDeliveryProdSecretKey
|
||||||
jwt.expiration=86400
|
jwt.expiration=86400
|
||||||
|
|
||||||
|
management.endpoints.web.exposure.include=health,info
|
||||||
|
management.endpoint.health.show-details=always
|
Reference in New Issue
Block a user