infra: Docker Compose 开发环境(PostgreSQL + Redis)

- docker-compose.dev.yml: PostgreSQL 17 + Redis 7 服务编排
- init.sql: auth 模块表结构 + 默认角色 + 超级管理员
- redis.conf: 开发环境 Redis 配置
- dev-setup.sh: 一键启动开发环境脚本
- .gitignore: 项目全局忽略规则

Made-with: Cursor
This commit is contained in:
bujinyuan
2026-02-28 10:36:38 +08:00
parent 37d206d556
commit d81c5743f5
5 changed files with 289 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
# EchoChat Redis 开发环境配置
# 绑定所有接口(开发环境,生产环境应只绑定 127.0.0.1
bind 0.0.0.0
# 关闭保护模式(开发环境)
protected-mode no
# 端口
port 6379
# 持久化:每 60 秒内至少 1 个 key 变更时触发 RDB 快照
save 60 1
# AOF 持久化
appendonly yes
appendfsync everysec
# 最大内存(开发环境 256MB 足够)
maxmemory 256mb
maxmemory-policy allkeys-lru
# 日志级别
loglevel notice
# 数据库数量
databases 16