版本控制
Some checks failed
构建并部署 Spring Boot 应用 / build-and-deploy (push) Has been cancelled

This commit is contained in:
2025-09-27 03:32:51 +08:00
parent f754e87136
commit 5e07bf55d7
4 changed files with 185 additions and 1 deletions

33
deploy.yml Normal file
View File

@@ -0,0 +1,33 @@
# Deployment configuration for CI/CD pipeline
version: '3.8'
services:
light-delivery-app:
# 使用云端 CI/CD 构建的镜像
image: light-delivery-app:${IMAGE_TAG:-latest}
container_name: light-delivery-app
ports:
- "8080:8080"
- "8443:8443"
environment:
- SPRING_PROFILES_ACTIVE=prod
- 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!
- JAVA_OPTS=-Xmx512m
- SERVER_PORT=8080
volumes:
- /etc/ssl/certs:/etc/ssl/certs
restart: unless-stopped
networks:
- light-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
light-network:
driver: bridge