diff --git a/deploy.yml b/deploy.yml index 0117595..ec14839 100644 --- a/deploy.yml +++ b/deploy.yml @@ -7,7 +7,7 @@ services: container_name: light-delivery-container ports: - "8080:8080" - - "8443:8443" + - "8443:443" # 修改这行,将宿主机8443端口映射到容器443端口 environment: - SPRING_DATASOURCE_PASSWORD=Hu@ng1998! - KEY_STORE_PASSWORD=k7cP6QLgJDkX @@ -23,11 +23,11 @@ services: networks: - light-network 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 timeout: 10s retries: 3 - start_period: 60s + start_period: 40s networks: light-network: diff --git a/pom.xml b/pom.xml index 5fe8f5d..84fbf34 100644 --- a/pom.xml +++ b/pom.xml @@ -119,6 +119,12 @@ true + + + org.springframework.boot + spring-boot-starter-actuator + + org.springframework.boot @@ -163,6 +169,16 @@ + + + org.apache.maven.plugins + maven-resources-plugin + 3.3.1 + + UTF-8 + + + com.google.cloud.tools diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 7f6bb01..ad78ebb 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,45 +1,38 @@ spring.application.name=Light -# 服务器端口配置 server.port=443 -# SSL配置 server.ssl.key-store-type=JKS server.ssl.key-store=/etc/ssl/certs/www.doubleyin.cn.jks 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.username=double spring.datasource.password=Hu@ng1998! spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver -# JPA / Hibernate Settings spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true spring.jpa.properties.hibernate.format_sql=true -# For MySQL spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect -# HikariCP Connection Pool Settings spring.datasource.hikari.maximum-pool-size=10 spring.datasource.hikari.minimum-idle=2 spring.datasource.hikari.connection-timeout=30000 spring.datasource.hikari.idle-timeout=600000 spring.datasource.hikari.max-lifetime=1800000 -# ------ WeChat Configuration ------ wx.appId=wx1b790fd953ac27bf wx.secret=b38c40c89cc4954472fb45d1e7cc27a4 wx.token=huang1998 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.code2session-url=https://api.weixin.qq.com/sns/jscode2session -# Logging Configuration logging.level.com.light.delivery=INFO -# JWT Configuration jwt.secret=lightDeliveryProdSecretKey -jwt.expiration=86400 \ No newline at end of file +jwt.expiration=86400 + +management.endpoints.web.exposure.include=health,info +management.endpoint.health.show-details=always \ No newline at end of file