mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 08:18:18 +00:00
fix(otel): fix container unhealty issue caused by healthy check (#4145)
* fix: fix container unhealty issue caused by healthy check * update readme file --------- Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
@@ -63,7 +63,7 @@ services:
|
||||
- jaeger-data:/badger
|
||||
ports:
|
||||
- "16686:16686" # Web UI
|
||||
- "14269:14269" # Admin/Metrics
|
||||
- "18888:8888" # Metrics
|
||||
- "4317" # otlp grpc
|
||||
- "4318" # otlp http
|
||||
command: [ "--config", "/etc/jaeger/config.yml" ]
|
||||
@@ -71,7 +71,7 @@ services:
|
||||
- otel-network
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:14269" ]
|
||||
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:8888/metrics" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
@@ -118,7 +118,7 @@ services:
|
||||
- otel-network
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:3100/ready" ]
|
||||
test: [ "CMD", "/usr/bin/loki", "--version" ]
|
||||
interval: 15s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
@@ -136,10 +136,10 @@ mkdir -p certs
|
||||
chown -R 10001:10001 certs
|
||||
```
|
||||
|
||||
You can also use Docker Compose. Using the `docker-compose.yml` file in the root directory:
|
||||
You can also use Docker Compose. Using the `docker-compose-simple.yml` file in the root directory:
|
||||
|
||||
```bash
|
||||
docker compose --profile observability up -d
|
||||
docker compose -f docker-compose-simple.yml up -d
|
||||
```
|
||||
|
||||
Before running Compose with host bind mounts:
|
||||
@@ -147,12 +147,12 @@ Before running Compose with host bind mounts:
|
||||
- Ensure every mounted host path is writable by `10001:10001`.
|
||||
- If you enable TLS, ensure the certificate mount for `/opt/tls` is also readable by `10001:10001`.
|
||||
- If matching host ownership is not practical, run the `rustfs` service with `user: "<host-uid>:<host-gid>"` instead.
|
||||
- `docker-compose-simple.yml` includes a `volume-permission-helper` service for named volumes. `docker-compose.yml` relies on you to prepare bind-mounted host paths in advance.
|
||||
- `docker-compose-simple.yml` includes a `volume-permission-helper` service for named volumes. `docker-compose-simple.yml` relies on you to prepare bind-mounted host paths in advance.
|
||||
|
||||
Similarly, you can run the command with podman
|
||||
|
||||
```bash
|
||||
podman compose --profile observability up -d
|
||||
podman compose -f docker-compose-simple.yml up -d
|
||||
```
|
||||
|
||||
Webhook notification quick start (Docker):
|
||||
|
||||
+3
-5
@@ -123,10 +123,10 @@ mkdir -p certs
|
||||
chown -R 10001:10001 certs
|
||||
```
|
||||
|
||||
您也可以使用 Docker Compose。使用根目录下的 `docker-compose.yml` 文件:
|
||||
您也可以使用 Docker Compose。使用根目录下的 `docker-compose-simple.yml` 文件:
|
||||
|
||||
```bash
|
||||
docker compose --profile observability up -d
|
||||
docker compose -f docker-compose-simple.yml up -d
|
||||
```
|
||||
|
||||
在使用 Compose 且包含宿主机绑定挂载时,请先确认:
|
||||
@@ -134,9 +134,7 @@ docker compose --profile observability up -d
|
||||
- 所有挂载到容器内的宿主机路径都对 `10001:10001` 可写。
|
||||
- 如果启用了 TLS,挂载到 `/opt/tls` 的证书目录也需要对 `10001:10001` 可读。
|
||||
- 如果不方便调整宿主机目录归属,可以为 `rustfs` 服务显式设置 `user: "<host-uid>:<host-gid>"`。
|
||||
- `docker-compose-simple.yml` 为命名 volume 提供了 `volume-permission-helper` 服务;`docker-compose.yml` 使用宿主机绑定挂载,因此需要您在启动前自行准备目录权限。
|
||||
|
||||
**注意**: 我们建议您在运行前查看 `docker-compose.yml` 文件。该文件定义了包括 Grafana、Prometheus 和 Jaeger 在内的多个服务,有助于 RustFS 的可观测性监控。如果您还想启动 Redis 或 Nginx 容器,可以指定相应的 profile。
|
||||
- `docker-compose-simple.yml` 为命名 volume 提供了 `volume-permission-helper` 服务;`docker-compose-simple.yml` 使用宿主机绑定挂载,因此需要您在启动前自行准备目录权限。
|
||||
|
||||
### 3\. 源码编译 (选项 3) - 进阶用户
|
||||
|
||||
|
||||
Reference in New Issue
Block a user