Add environment configuration and documentation for various services

- Created .env.example files for Kafka, Kibana, KodBox, Kong, Langfuse, Logstash, n8n, Nginx, OceanBase, OpenCoze, RocketMQ, TiDB, and TiKV.
- Added README.md and README.zh.md files for OceanBase, RocketMQ, TiDB, and TiKV, detailing usage, configuration, and access instructions.
- Implemented docker-compose.yaml files for OceanBase, RocketMQ, TiDB, and TiKV, defining service configurations, health checks, and resource limits.
- Included broker.conf for RocketMQ to specify broker settings.
- Established a consistent timezone (UTC) across all services.
- Provided optional port overrides in .env.example files for flexibility in deployment.
This commit is contained in:
Sun-ZhenXing
2025-10-22 11:46:50 +08:00
parent 84e8b85990
commit ece59b42bf
49 changed files with 2326 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
# OceanBase version
OCEANBASE_VERSION=4.3.3.1-106000012024110114
# Timezone
TZ=UTC
# Root password
OB_ROOT_PASSWORD=oceanbase
# Cluster configuration
OB_CLUSTER_NAME=obcluster
OB_TENANT_NAME=test
OB_TENANT_PASSWORD=oceanbase
# Resource limits
OB_MEMORY_LIMIT=8G
OB_DATAFILE_SIZE=10G
OB_LOG_DISK_SIZE=6G
# Port overrides (optional)
# OCEANBASE_SQL_PORT_OVERRIDE=2881
# OCEANBASE_RPC_PORT_OVERRIDE=2882

51
src/oceanbase/README.md Normal file
View File

@@ -0,0 +1,51 @@
# OceanBase
OceanBase is a distributed relational database developed by Ant Group. It features high availability, high scalability, and is compatible with MySQL.
## Usage
```bash
docker compose up -d
```
## Configuration
Key environment variables:
- `OB_ROOT_PASSWORD`: Root user password (default: `oceanbase`)
- `OB_TENANT_NAME`: Tenant name (default: `test`)
- `OB_TENANT_PASSWORD`: Tenant password (default: `oceanbase`)
- `OB_MEMORY_LIMIT`: Memory limit (default: `8G`, minimum: `8G`)
- `OB_DATAFILE_SIZE`: Data file size (default: `10G`)
- `OB_LOG_DISK_SIZE`: Log disk size (default: `6G`)
## Ports
- `2881`: MySQL protocol port
- `2882`: RPC port
## Connection
Connect using MySQL client:
```bash
mysql -h127.0.0.1 -P2881 -uroot@test -poceanbase
```
Or connect to sys tenant:
```bash
mysql -h127.0.0.1 -P2881 -uroot -poceanbase
```
## Notes
- OceanBase requires at least 8GB of memory to run properly
- First startup may take several minutes to initialize
- Use `slim` mode for development/testing environments
- For production, consider using `normal` mode and a dedicated cluster
## References
- [OceanBase Official Documentation](https://www.oceanbase.com/docs)
- [OceanBase Docker Hub](https://hub.docker.com/r/oceanbase/oceanbase-ce)

View File

@@ -0,0 +1,51 @@
# OceanBase
OceanBase 是由蚂蚁集团开发的分布式关系型数据库,具有高可用、高扩展性的特点,并兼容 MySQL 协议。
## 使用方法
```bash
docker compose up -d
```
## 配置说明
主要环境变量:
- `OB_ROOT_PASSWORD`root 用户密码(默认:`oceanbase`
- `OB_TENANT_NAME`:租户名称(默认:`test`
- `OB_TENANT_PASSWORD`:租户密码(默认:`oceanbase`
- `OB_MEMORY_LIMIT`:内存限制(默认:`8G`,最小:`8G`
- `OB_DATAFILE_SIZE`:数据文件大小(默认:`10G`
- `OB_LOG_DISK_SIZE`:日志磁盘大小(默认:`6G`
## 端口说明
- `2881`MySQL 协议端口
- `2882`RPC 端口
## 连接方式
使用 MySQL 客户端连接:
```bash
mysql -h127.0.0.1 -P2881 -uroot@test -poceanbase
```
或连接到 sys 租户:
```bash
mysql -h127.0.0.1 -P2881 -uroot -poceanbase
```
## 注意事项
- OceanBase 需要至少 8GB 内存才能正常运行
- 首次启动可能需要几分钟时间进行初始化
- 使用 `slim` 模式适合开发/测试环境
- 生产环境建议使用 `normal` 模式和专用集群
## 参考资料
- [OceanBase 官方文档](https://www.oceanbase.com/docs)
- [OceanBase Docker Hub](https://hub.docker.com/r/oceanbase/oceanbase-ce)

View File

@@ -0,0 +1,44 @@
x-default: &default
restart: unless-stopped
logging:
driver: json-file
options:
max-size: 100m
max-file: "3"
services:
oceanbase:
<<: *default
image: oceanbase/oceanbase-ce:${OCEANBASE_VERSION:-4.3.3.1-106000012024110114}
environment:
TZ: ${TZ:-UTC}
MODE: slim
OB_ROOT_PASSWORD: ${OB_ROOT_PASSWORD:-oceanbase}
OB_CLUSTER_NAME: ${OB_CLUSTER_NAME:-obcluster}
OB_TENANT_NAME: ${OB_TENANT_NAME:-test}
OB_TENANT_PASSWORD: ${OB_TENANT_PASSWORD:-oceanbase}
OB_MEMORY_LIMIT: ${OB_MEMORY_LIMIT:-8G}
OB_DATAFILE_SIZE: ${OB_DATAFILE_SIZE:-10G}
OB_LOG_DISK_SIZE: ${OB_LOG_DISK_SIZE:-6G}
volumes:
- oceanbase_data:/root/ob
ports:
- "${OCEANBASE_SQL_PORT_OVERRIDE:-2881}:2881"
- "${OCEANBASE_RPC_PORT_OVERRIDE:-2882}:2882"
deploy:
resources:
limits:
cpus: '4.0'
memory: 10G
reservations:
cpus: '2.0'
memory: 8G
healthcheck:
test: ["CMD-SHELL", "mysql -h127.0.0.1 -P2881 -uroot -p$$OB_ROOT_PASSWORD -e 'SELECT 1' || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 120s
volumes:
oceanbase_data: