修复工作

This commit is contained in:
2025-09-30 19:14:28 +08:00
parent 7e7818b7d3
commit 0f7dc58a50
2 changed files with 7 additions and 13 deletions

14
.env
View File

@@ -1,9 +1,9 @@
# MySQL数据库配置使用本地MySQL不在Docker中部署
MYSQL_HOST=localhost
MYSQL_PORT=3306
# MySQL数据库配置使用远程MySQL通过IP地址直接连接
MYSQL_HOST=49.232.154.205
MYSQL_PORT=10080
MYSQL_DATABASE=fad_watch
MYSQL_USER=root
MYSQL_PASSWORD=root
MYSQL_PASSWORD=Fuande@666
# Redis配置
REDIS_HOST=rtsp-redis
@@ -29,8 +29,4 @@ MINIO_SECRET_KEY=05SFC5fleqTnaLRYBrxHiphMFYbGX5nYicj0WCHA
MINIO_BUCKET=rtsp
# 时区配置
TZ=Asia/Shanghai
# 备注:
# - MySQL使用本地数据库Docker容器通过host.docker.internal连接
# - MinIO使用外部已部署的服务
TZ=Asia/Shanghai

View File

@@ -41,8 +41,6 @@ services:
dockerfile: ruoyi-admin/Dockerfile
container_name: ${BACKEND_HOST}
restart: always
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
redis:
condition: service_healthy
@@ -50,7 +48,7 @@ services:
condition: service_started
environment:
TZ: ${TZ}
SPRING_DATASOURCE_URL: jdbc:mysql://host.docker.internal:${MYSQL_PORT}/${MYSQL_DATABASE}?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
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}
SPRING_DATA_REDIS_HOST: ${REDIS_HOST}
@@ -74,7 +72,7 @@ services:
context: ./rtsp-vue
dockerfile: Dockerfile
args:
BACKEND_API_URL: http://${BACKEND_HOST}:${BACKEND_PORT}
BACKEND_API_URL: http://localhost:${BACKEND_PORT}
container_name: rtsp-frontend
restart: always
ports: