33 lines
992 B
YAML
33 lines
992 B
YAML
|
# 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
|