kindergarten_java/docker-compose.yml
lesingle 0d506cf19c chore(deploy): 本地开发连接远程开发服务器数据库
- 去掉本地 MySQL 容器,直接连 8.148.151.56:3306
- 关闭 Flyway 自动迁移(SPRING_FLYWAY_ENABLED=false),防止本地误跑

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 16:07:06 +08:00

33 lines
908 B
YAML

version: '3.8'
services:
backend:
build:
context: ./reading-platform-java
container_name: kg-backend
restart: unless-stopped
ports:
- "8080:8080"
environment:
- SPRING_PROFILES_ACTIVE=prod
- SPRING_DATASOURCE_URL=jdbc:mysql://8.148.151.56:3306/reading_platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- SPRING_DATASOURCE_USERNAME=root
- SPRING_DATASOURCE_PASSWORD=reading_platform_pwd
- SPRING_FLYWAY_ENABLED=false
- JWT_SECRET=${JWT_SECRET:-reading-platform-jwt-secret-key-must-be-at-least-256-bits-long}
volumes:
- uploads_data:/app/uploads
frontend:
build:
context: ./reading-platform-frontend
container_name: kg-frontend
restart: unless-stopped
ports:
- "3000:80"
depends_on:
- backend
volumes:
uploads_data: