Files
Nexus/docs/changelog/2026-06-04-docker-prod-2c8g-tuning.md
T
Nexus Deploy bfda70bbe7
Nexus CI/CD / test (push) Waiting to run
Nexus CI/CD / deploy (push) Blocked by required conditions
Nexus Pre-commit Checks / quick-check (push) Waiting to run
chore(docker): tune production stack for 2C8G hosts
Add mysql-prod-2c8g.cnf, container mem/cpu limits, Redis maxmemory,
and default Nexus pool 30/20 for 8GiB 1Panel deployments.
2026-06-05 22:44:06 +08:00

29 lines
976 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Changelog — 生产 Compose 2C8G 调优
## 摘要
为 2 核 8G 单机(1Panel + Docker Compose)增加 MySQL/Redis/Nexus 内存与连接池调优。
## 变更
| 文件 | 说明 |
|------|------|
| `docker/mysql-prod-2c8g.cnf` | `innodb_buffer_pool_size=1024M``max_connections=120` |
| `docker/docker-compose.prod.yml` | 挂载 cnf`mem_limit`/`cpus`Redis `maxmemory 256mb`;默认 pool 30/20 |
| `docker/.env.prod.example` | 文档化 `NEXUS_DB_POOL_SIZE` / `OVERFLOW` |
| `docker/README.md` | 2C8G 说明 |
| `docs/design/plans/2026-06-04-1panel-docker-production.md` | 资源预算表 |
## 验证
```bash
docker compose -f docker/docker-compose.prod.yml config
# 启动后:
docker compose -f docker/docker-compose.prod.yml exec mysql \
mysql -uroot -p"$MYSQL_ROOT_PASSWORD" -e "SHOW VARIABLES LIKE 'innodb_buffer_pool_size';"
```
## 回滚
移除 `mysql-prod-2c8g.cnf` 挂载并 `compose up`;或恢复默认 pool 160/120(不推荐 8G 机)。