Update MinerU, Gitea, InfluxDB, Phoenix, and Selenium configurations
- Bump MinerU version from 2.7.1 to 2.7.2 in .env.example, Dockerfile, README files, and docker-compose.yaml. - Update Gitea version from 1.25.2-rootless to 1.25.4-rootless in .env.example and docker-compose.yaml. - Add InfluxDB configuration files including .env.example, README.md, README.zh.md, and docker-compose.yaml with version 2.8.0. - Bump Phoenix version from 12.28.1-nonroot to 12.31.2-nonroot in .env.example and docker-compose.yaml, and update README files. - Introduce Selenium standalone configuration with version 144.0-20260120, including .env.example, README.md, README.zh.md, and docker-compose.yaml.
This commit is contained in:
33
src/influxdb/.env.example
Normal file
33
src/influxdb/.env.example
Normal file
@@ -0,0 +1,33 @@
|
||||
# InfluxDB Version
|
||||
INFLUXDB_VERSION=2.8.0
|
||||
|
||||
# Timezone
|
||||
TZ=UTC
|
||||
|
||||
# Initialization mode (setup or upgrade)
|
||||
INFLUXDB_INIT_MODE=setup
|
||||
|
||||
# Admin user credentials
|
||||
INFLUXDB_ADMIN_USERNAME=admin
|
||||
INFLUXDB_ADMIN_PASSWORD=changeme123456
|
||||
|
||||
# Organization name
|
||||
INFLUXDB_ORG=myorg
|
||||
|
||||
# Default bucket name
|
||||
INFLUXDB_BUCKET=mybucket
|
||||
|
||||
# Retention period (0 means infinite)
|
||||
INFLUXDB_RETENTION=0
|
||||
|
||||
# Admin token for API access
|
||||
INFLUXDB_ADMIN_TOKEN=mytoken123456
|
||||
|
||||
# Port to bind to on the host machine
|
||||
INFLUXDB_PORT_OVERRIDE=8086
|
||||
|
||||
# Resource limits
|
||||
INFLUXDB_CPU_LIMIT=2.0
|
||||
INFLUXDB_MEMORY_LIMIT=2G
|
||||
INFLUXDB_CPU_RESERVATION=0.5
|
||||
INFLUXDB_MEMORY_RESERVATION=512M
|
||||
169
src/influxdb/README.md
Normal file
169
src/influxdb/README.md
Normal file
@@ -0,0 +1,169 @@
|
||||
# InfluxDB
|
||||
|
||||
InfluxDB is a high-performance, open-source time series database designed for handling high write and query loads. It is ideal for storing and analyzing metrics, events, and real-time analytics data.
|
||||
|
||||
## Features
|
||||
|
||||
- **Time Series Optimized**: Purpose-built for time-stamped data
|
||||
- **High Performance**: Fast writes and queries for time series data
|
||||
- **SQL-like Query Language**: Flux and InfluxQL for flexible data querying
|
||||
- **Built-in UI**: Web-based interface for data exploration and visualization
|
||||
- **Retention Policies**: Automatic data expiration and downsampling
|
||||
- **Multi-tenancy**: Organizations and buckets for data isolation
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. Copy the environment file and customize it:
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
2. Edit `.env` to configure your InfluxDB instance:
|
||||
- `INFLUXDB_ADMIN_USERNAME`: Admin username (default: admin)
|
||||
- `INFLUXDB_ADMIN_PASSWORD`: Admin password (default: changeme123456)
|
||||
- `INFLUXDB_ORG`: Organization name (default: myorg)
|
||||
- `INFLUXDB_BUCKET`: Default bucket name (default: mybucket)
|
||||
- `INFLUXDB_ADMIN_TOKEN`: API access token (default: mytoken123456)
|
||||
|
||||
3. Start InfluxDB:
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
4. Access the InfluxDB UI at `http://localhost:8086`
|
||||
|
||||
## Configuration
|
||||
|
||||
### Environment Variables
|
||||
|
||||
| Variable | Description | Default |
|
||||
| ------------------------- | ----------------------------------- | ---------------- |
|
||||
| `INFLUXDB_VERSION` | InfluxDB version | `2.8.0` |
|
||||
| `TZ` | Timezone | `UTC` |
|
||||
| `INFLUXDB_INIT_MODE` | Initialization mode (setup/upgrade) | `setup` |
|
||||
| `INFLUXDB_ADMIN_USERNAME` | Admin username | `admin` |
|
||||
| `INFLUXDB_ADMIN_PASSWORD` | Admin password | `changeme123456` |
|
||||
| `INFLUXDB_ORG` | Organization name | `myorg` |
|
||||
| `INFLUXDB_BUCKET` | Default bucket name | `mybucket` |
|
||||
| `INFLUXDB_RETENTION` | Retention period (0 for infinite) | `0` |
|
||||
| `INFLUXDB_ADMIN_TOKEN` | Admin API token | `mytoken123456` |
|
||||
| `INFLUXDB_PORT_OVERRIDE` | Host port binding | `8086` |
|
||||
|
||||
### Volumes
|
||||
|
||||
- `influxdb_data`: Stores time series data
|
||||
- `influxdb_config`: Stores configuration files
|
||||
|
||||
## Usage
|
||||
|
||||
### Accessing the Web UI
|
||||
|
||||
Open your browser and navigate to:
|
||||
|
||||
```text
|
||||
http://localhost:8086
|
||||
```
|
||||
|
||||
Login with the credentials configured in your `.env` file.
|
||||
|
||||
### Using the CLI
|
||||
|
||||
Execute commands inside the container:
|
||||
|
||||
```bash
|
||||
docker compose exec influxdb influx
|
||||
```
|
||||
|
||||
### Writing Data
|
||||
|
||||
Using the Flux query language:
|
||||
|
||||
```bash
|
||||
docker compose exec influxdb influx write \
|
||||
--bucket mybucket \
|
||||
--org myorg \
|
||||
'measurement,tag=value field=42'
|
||||
```
|
||||
|
||||
### Querying Data
|
||||
|
||||
Query data using the CLI:
|
||||
|
||||
```bash
|
||||
docker compose exec influxdb influx query \
|
||||
--org myorg \
|
||||
'from(bucket: "mybucket") |> range(start: -1h)'
|
||||
```
|
||||
|
||||
## API Access
|
||||
|
||||
InfluxDB provides a RESTful API for programmatic access:
|
||||
|
||||
```bash
|
||||
curl -X POST "http://localhost:8086/api/v2/query?org=myorg" \
|
||||
-H "Authorization: Token mytoken123456" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"query": "from(bucket: \"mybucket\") |> range(start: -1h)"}'
|
||||
```
|
||||
|
||||
## Backup and Restore
|
||||
|
||||
### Backup
|
||||
|
||||
```bash
|
||||
docker compose exec influxdb influx backup /var/lib/influxdb2/backup
|
||||
docker compose cp influxdb:/var/lib/influxdb2/backup ./backup
|
||||
```
|
||||
|
||||
### Restore
|
||||
|
||||
```bash
|
||||
docker compose cp ./backup influxdb:/var/lib/influxdb2/backup
|
||||
docker compose exec influxdb influx restore /var/lib/influxdb2/backup
|
||||
```
|
||||
|
||||
## Security Considerations
|
||||
|
||||
1. **Change Default Credentials**: Always change the default admin password and token in production
|
||||
2. **Use Strong Tokens**: Generate cryptographically secure tokens for API access
|
||||
3. **Network Security**: Consider using a reverse proxy with HTTPS in production
|
||||
4. **Access Control**: Use InfluxDB's built-in authorization system to limit access
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Container won't start
|
||||
|
||||
Check the logs:
|
||||
|
||||
```bash
|
||||
docker compose logs influxdb
|
||||
```
|
||||
|
||||
### Cannot access web UI
|
||||
|
||||
Ensure port 8086 is not in use:
|
||||
|
||||
```bash
|
||||
netstat -an | grep 8086
|
||||
```
|
||||
|
||||
### Data persistence
|
||||
|
||||
Verify volumes are properly mounted:
|
||||
|
||||
```bash
|
||||
docker compose exec influxdb ls -la /var/lib/influxdb2
|
||||
```
|
||||
|
||||
## References
|
||||
|
||||
- [Official Documentation](https://docs.influxdata.com/influxdb/v2/)
|
||||
- [Flux Query Language](https://docs.influxdata.com/flux/v0/)
|
||||
- [Docker Hub](https://hub.docker.com/_/influxdb)
|
||||
- [GitHub Repository](https://github.com/influxdata/influxdb)
|
||||
|
||||
## License
|
||||
|
||||
InfluxDB is available under the MIT License. See the [LICENSE](https://github.com/influxdata/influxdb/blob/master/LICENSE) file for more information.
|
||||
169
src/influxdb/README.zh.md
Normal file
169
src/influxdb/README.zh.md
Normal file
@@ -0,0 +1,169 @@
|
||||
# InfluxDB
|
||||
|
||||
InfluxDB 是一个高性能的开源时序数据库,专为处理高写入和查询负载而设计。它非常适合存储和分析指标、事件以及实时分析数据。
|
||||
|
||||
## 功能特性
|
||||
|
||||
- **时序优化**:专为时间戳数据而构建
|
||||
- **高性能**:快速的时序数据写入和查询
|
||||
- **类 SQL 查询语言**:Flux 和 InfluxQL 提供灵活的数据查询
|
||||
- **内置 UI**:基于 Web 的数据探索和可视化界面
|
||||
- **保留策略**:自动数据过期和降采样
|
||||
- **多租户**:通过组织和桶实现数据隔离
|
||||
|
||||
## 快速开始
|
||||
|
||||
1. 复制环境配置文件并自定义:
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
2. 编辑 `.env` 文件配置您的 InfluxDB 实例:
|
||||
- `INFLUXDB_ADMIN_USERNAME`:管理员用户名(默认:admin)
|
||||
- `INFLUXDB_ADMIN_PASSWORD`:管理员密码(默认:changeme123456)
|
||||
- `INFLUXDB_ORG`:组织名称(默认:myorg)
|
||||
- `INFLUXDB_BUCKET`:默认桶名称(默认:mybucket)
|
||||
- `INFLUXDB_ADMIN_TOKEN`:API 访问令牌(默认:mytoken123456)
|
||||
|
||||
3. 启动 InfluxDB:
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
4. 访问 InfluxDB UI:`http://localhost:8086`
|
||||
|
||||
## 配置说明
|
||||
|
||||
### 环境变量
|
||||
|
||||
| 变量 | 说明 | 默认值 |
|
||||
| ------------------------- | --------------------------- | ---------------- |
|
||||
| `INFLUXDB_VERSION` | InfluxDB 版本 | `2.8.0` |
|
||||
| `TZ` | 时区 | `UTC` |
|
||||
| `INFLUXDB_INIT_MODE` | 初始化模式(setup/upgrade) | `setup` |
|
||||
| `INFLUXDB_ADMIN_USERNAME` | 管理员用户名 | `admin` |
|
||||
| `INFLUXDB_ADMIN_PASSWORD` | 管理员密码 | `changeme123456` |
|
||||
| `INFLUXDB_ORG` | 组织名称 | `myorg` |
|
||||
| `INFLUXDB_BUCKET` | 默认桶名称 | `mybucket` |
|
||||
| `INFLUXDB_RETENTION` | 保留期限(0 表示永久) | `0` |
|
||||
| `INFLUXDB_ADMIN_TOKEN` | 管理员 API 令牌 | `mytoken123456` |
|
||||
| `INFLUXDB_PORT_OVERRIDE` | 主机端口绑定 | `8086` |
|
||||
|
||||
### 数据卷
|
||||
|
||||
- `influxdb_data`:存储时序数据
|
||||
- `influxdb_config`:存储配置文件
|
||||
|
||||
## 使用方法
|
||||
|
||||
### 访问 Web UI
|
||||
|
||||
在浏览器中打开:
|
||||
|
||||
```text
|
||||
http://localhost:8086
|
||||
```
|
||||
|
||||
使用 `.env` 文件中配置的凭据登录。
|
||||
|
||||
### 使用命令行
|
||||
|
||||
在容器内执行命令:
|
||||
|
||||
```bash
|
||||
docker compose exec influxdb influx
|
||||
```
|
||||
|
||||
### 写入数据
|
||||
|
||||
使用 Flux 查询语言:
|
||||
|
||||
```bash
|
||||
docker compose exec influxdb influx write \
|
||||
--bucket mybucket \
|
||||
--org myorg \
|
||||
'measurement,tag=value field=42'
|
||||
```
|
||||
|
||||
### 查询数据
|
||||
|
||||
使用 CLI 查询数据:
|
||||
|
||||
```bash
|
||||
docker compose exec influxdb influx query \
|
||||
--org myorg \
|
||||
'from(bucket: "mybucket") |> range(start: -1h)'
|
||||
```
|
||||
|
||||
## API 访问
|
||||
|
||||
InfluxDB 提供 RESTful API 用于编程访问:
|
||||
|
||||
```bash
|
||||
curl -X POST "http://localhost:8086/api/v2/query?org=myorg" \
|
||||
-H "Authorization: Token mytoken123456" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"query": "from(bucket: \"mybucket\") |> range(start: -1h)"}'
|
||||
```
|
||||
|
||||
## 备份与恢复
|
||||
|
||||
### 备份
|
||||
|
||||
```bash
|
||||
docker compose exec influxdb influx backup /var/lib/influxdb2/backup
|
||||
docker compose cp influxdb:/var/lib/influxdb2/backup ./backup
|
||||
```
|
||||
|
||||
### 恢复
|
||||
|
||||
```bash
|
||||
docker compose cp ./backup influxdb:/var/lib/influxdb2/backup
|
||||
docker compose exec influxdb influx restore /var/lib/influxdb2/backup
|
||||
```
|
||||
|
||||
## 安全注意事项
|
||||
|
||||
1. **修改默认凭据**:在生产环境中务必修改默认的管理员密码和令牌
|
||||
2. **使用强令牌**:为 API 访问生成加密安全的令牌
|
||||
3. **网络安全**:生产环境中考虑使用带 HTTPS 的反向代理
|
||||
4. **访问控制**:使用 InfluxDB 的内置授权系统限制访问
|
||||
|
||||
## 故障排除
|
||||
|
||||
### 容器无法启动
|
||||
|
||||
查看日志:
|
||||
|
||||
```bash
|
||||
docker compose logs influxdb
|
||||
```
|
||||
|
||||
### 无法访问 Web UI
|
||||
|
||||
确保端口 8086 未被占用:
|
||||
|
||||
```bash
|
||||
netstat -an | grep 8086
|
||||
```
|
||||
|
||||
### 数据持久化
|
||||
|
||||
验证数据卷是否正确挂载:
|
||||
|
||||
```bash
|
||||
docker compose exec influxdb ls -la /var/lib/influxdb2
|
||||
```
|
||||
|
||||
## 参考资源
|
||||
|
||||
- [官方文档](https://docs.influxdata.com/influxdb/v2/)
|
||||
- [Flux 查询语言](https://docs.influxdata.com/flux/v0/)
|
||||
- [Docker Hub](https://hub.docker.com/_/influxdb)
|
||||
- [GitHub 仓库](https://github.com/influxdata/influxdb)
|
||||
|
||||
## 许可证
|
||||
|
||||
InfluxDB 采用 MIT 许可证发布。详情请参阅 [LICENSE](https://github.com/influxdata/influxdb/blob/master/LICENSE) 文件。
|
||||
45
src/influxdb/docker-compose.yaml
Normal file
45
src/influxdb/docker-compose.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
x-defaults: &defaults
|
||||
restart: unless-stopped
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: 100m
|
||||
max-file: "3"
|
||||
|
||||
services:
|
||||
influxdb:
|
||||
<<: *defaults
|
||||
image: ${GLOBAL_REGISTRY:-}influxdb:${INFLUXDB_VERSION:-2.8.0}
|
||||
environment:
|
||||
TZ: ${TZ:-UTC}
|
||||
# InfluxDB v2 initialization
|
||||
DOCKER_INFLUXDB_INIT_MODE: ${INFLUXDB_INIT_MODE:-setup}
|
||||
DOCKER_INFLUXDB_INIT_USERNAME: ${INFLUXDB_ADMIN_USERNAME:-admin}
|
||||
DOCKER_INFLUXDB_INIT_PASSWORD: ${INFLUXDB_ADMIN_PASSWORD:-changeme123456}
|
||||
DOCKER_INFLUXDB_INIT_ORG: ${INFLUXDB_ORG:-myorg}
|
||||
DOCKER_INFLUXDB_INIT_BUCKET: ${INFLUXDB_BUCKET:-mybucket}
|
||||
DOCKER_INFLUXDB_INIT_RETENTION: ${INFLUXDB_RETENTION:-0}
|
||||
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${INFLUXDB_ADMIN_TOKEN:-mytoken123456}
|
||||
volumes:
|
||||
- influxdb_data:/var/lib/influxdb2
|
||||
- influxdb_config:/etc/influxdb2
|
||||
ports:
|
||||
- "${INFLUXDB_PORT_OVERRIDE:-8086}:8086"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: ${INFLUXDB_CPU_LIMIT:-2.0}
|
||||
memory: ${INFLUXDB_MEMORY_LIMIT:-2G}
|
||||
reservations:
|
||||
cpus: ${INFLUXDB_CPU_RESERVATION:-0.5}
|
||||
memory: ${INFLUXDB_MEMORY_RESERVATION:-512M}
|
||||
healthcheck:
|
||||
test: ["CMD", "influx", "ping"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
volumes:
|
||||
influxdb_data:
|
||||
influxdb_config:
|
||||
Reference in New Issue
Block a user