修复工作

This commit is contained in:
2025-10-01 17:48:57 +08:00
parent b4e8cf5c33
commit 5e54e4ae62
4 changed files with 26 additions and 23 deletions

View File

@@ -48,6 +48,10 @@ services:
environment:
TZ: ${TZ}
SERVER_HOST: ${SERVER_HOST:-localhost}
SERVER_PORT: ${BACKEND_EXTERNAL_PORT}
SERVER_ADDRESS: 0.0.0.0
MEDIA_SERVER_PORT: ${MEDIA_SERVER_EXTERNAL_PORT}
MEDIA_SERVER_ADDRESS: 0.0.0.0
SPRING_DATASOURCE_URL: jdbc:mysql://${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DATABASE}?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
SPRING_DATASOURCE_USERNAME: ${MYSQL_USER}
SPRING_DATASOURCE_PASSWORD: ${MYSQL_PASSWORD}
@@ -59,7 +63,7 @@ services:
- backend-logs:/app/logs
- backend-upload:/app/upload
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
test: ["CMD", "curl", "-f", "http://localhost:${BACKEND_EXTERNAL_PORT}/actuator/health"]
interval: 30s
timeout: 10s
retries: 5
@@ -69,19 +73,14 @@ services:
build:
context: ./rtsp-vue
dockerfile: Dockerfile
args:
BACKEND_API_URL: http://localhost:${BACKEND_PORT}
container_name: rtsp-frontend
restart: always
network_mode: "host"
depends_on:
backend:
condition: service_healthy
environment:
TZ: ${TZ}
NGINX_PORT: ${FRONTEND_PORT}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${FRONTEND_PORT}"]
test: ["CMD", "sh", "-c", "curl -f http://localhost:${FRONTEND_PORT}"]
interval: 30s
timeout: 10s
retries: 3