包含以下内容: 1. Spring Boot后端项目结构 2. Vue.js前端项目结构 3. Docker Compose部署配置 4. MySQL数据库初始化脚本 5. Redis缓存配置 6. Nginx反向代理配置 7. 完整的项目文档 技术栈: - 后端: Spring Boot 2.7.18 + Java 11 + MyBatis Plus - 前端: Vue.js 3 + TypeScript + Element Plus - 数据库: MySQL 8.0 + Redis 7 - 部署: Docker Compose + Nginx 已部署服务: - 后端API: http://localhost:18080 - 前端界面: http://localhost:13000 - 数据库管理: http://localhost:18081 - MySQL: localhost:13306 - Redis: localhost:16379
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# MySQL数据库
|
|
mysql:
|
|
image: mysql:8.0
|
|
container_name: wecom-mysql
|
|
restart: unless-stopped
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: wecom123456
|
|
MYSQL_DATABASE: wecom_middleware
|
|
MYSQL_USER: wecom
|
|
MYSQL_PASSWORD: wecom123456
|
|
ports:
|
|
- "13306:3306"
|
|
volumes:
|
|
- mysql_data:/var/lib/mysql
|
|
- ./scripts/init-simple.sql:/docker-entrypoint-initdb.d/init.sql
|
|
command:
|
|
- --character-set-server=utf8mb4
|
|
- --collation-server=utf8mb4_unicode_ci
|
|
- --default-authentication-plugin=mysql_native_password
|
|
|
|
# Redis缓存
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: wecom-redis
|
|
restart: unless-stopped
|
|
ports:
|
|
- "16379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
command: redis-server --appendonly yes --requirepass redis123456
|
|
|
|
# 数据库管理界面
|
|
adminer:
|
|
image: adminer
|
|
container_name: wecom-adminer
|
|
restart: unless-stopped
|
|
ports:
|
|
- "18081:8080"
|
|
environment:
|
|
ADMINER_DEFAULT_SERVER: mysql
|
|
|
|
volumes:
|
|
mysql_data:
|
|
driver: local
|
|
redis_data:
|
|
driver: local |