修改配置文件,使用docker启动mysql和redis
This commit is contained in:
parent
3d77f7a3dc
commit
0989bb2209
4
.gitignore
vendored
4
.gitignore
vendored
@ -45,3 +45,7 @@ nbdist/
|
||||
!*/build/*.java
|
||||
!*/build/*.html
|
||||
!*/build/*.xml
|
||||
|
||||
# 项目运行时生成的目录
|
||||
uploads/
|
||||
logs/
|
||||
|
||||
79
docker-compose.yml
Normal file
79
docker-compose.yml
Normal file
@ -0,0 +1,79 @@
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
container_name: ruoyi-mysql
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3306:3306"
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
MYSQL_DATABASE: ry-vue
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql
|
||||
- ./sql/ry_20250522.sql:/docker-entrypoint-initdb.d/01-ry_20250522.sql
|
||||
- ./sql/quartz.sql:/docker-entrypoint-initdb.d/02-quartz.sql
|
||||
command: >
|
||||
--default-authentication-plugin=mysql_native_password
|
||||
--character-set-server=utf8mb4
|
||||
--collation-server=utf8mb4_unicode_ci
|
||||
networks:
|
||||
- ruoyi-network
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-ppassword"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: ruoyi-redis
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
networks:
|
||||
- ruoyi-network
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin:5
|
||||
container_name: ruoyi-phpmyadmin
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8081:80"
|
||||
environment:
|
||||
PMA_HOST: mysql
|
||||
PMA_PORT: 3306
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
depends_on:
|
||||
- mysql
|
||||
networks:
|
||||
- ruoyi-network
|
||||
|
||||
redisinsight:
|
||||
image: redis/redisinsight:2.64
|
||||
container_name: ruoyi-redisinsight
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8001:5540"
|
||||
volumes:
|
||||
- redisinsight_data:/data
|
||||
depends_on:
|
||||
- redis
|
||||
networks:
|
||||
- ruoyi-network
|
||||
|
||||
volumes:
|
||||
mysql_data:
|
||||
redis_data:
|
||||
redisinsight_data:
|
||||
|
||||
networks:
|
||||
ruoyi-network:
|
||||
driver: bridge
|
||||
@ -6,8 +6,8 @@ ruoyi:
|
||||
version: 3.9.1
|
||||
# 版权年份
|
||||
copyrightYear: 2026
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
profile: D:/ruoyi/uploadPath
|
||||
# 文件路径(相对路径,基于项目根目录)
|
||||
profile: ./uploads
|
||||
# 获取ip地址开关
|
||||
addressEnabled: false
|
||||
# 验证码类型 math 数字计算 char 字符验证
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="/home/ruoyi/logs" />
|
||||
<property name="log.path" value="./logs" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user