Skip to content

Commit c42c809

Browse files
committed
Docs: update docker compose installation
1 parent fd5082d commit c42c809

File tree

2 files changed

+100
-4
lines changed

2 files changed

+100
-4
lines changed

docs/en/installation/docker/index.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,55 @@ docker run -d \
173173
-e RUSTFS_TLS_PATH=/certs \
174174
```
175175

176-
## 5. Verification and Access
176+
### Docker Compose Installation
177+
178+
RustFS officially provides a Docker Compose installation method. The [`docker-compose.yml`](https://github.com/rustfs/rustfs/blob/main/docker-compose.yml) file includes multiple services, such as `grafana`, `prometheus`, `otel-collector`, and `jaeger`, mainly for observability. If you want to deploy these services together, clone the [RustFS code repository](https://github.com/rustfs/rustfs) locally,
179+
180+
```
181+
git clone git@github.com:rustfs/rustfs.git
182+
```
183+
184+
Running the command under root directory,
185+
186+
```
187+
docker compose --profile observability up -d
188+
```
189+
190+
Started containers is as below,
191+
192+
```
193+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
194+
c13c23fe3d9d rustfs/rustfs:latest "/entrypoint.sh rust…" 6 seconds ago Up 5 seconds (health: starting) 0.0.0.0:9000-9001->9000-9001/tcp, :::9000-9001->9000-9001/tcp rustfs-server
195+
e3f4fc4a83a2 grafana/grafana:latest "/run.sh" 7 seconds ago Up 5 seconds 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp grafana
196+
71ef1b8212cf prom/prometheus:latest "/bin/prometheus --c…" 7 seconds ago Up 5 seconds 0.0.0.0:9090->9090/tcp, :::9090->9090/tcp prometheus
197+
e7db806b2d6f jaegertracing/all-in-one:latest "/go/bin/all-in-one-…" 7 seconds ago Up 5 seconds 4317-4318/tcp, 9411/tcp, 0.0.0.0:14250->14250/tcp, :::14250->14250/tcp, 14268/tcp, 0.0.0.0:16686->16686/tcp, :::16686->16686/tcp jaeger
198+
1897830a2f1e otel/opentelemetry-collector-contrib:latest "/otelcol-contrib --…" 7 seconds ago Up 5 seconds 0.0.0.0:4317-4318->4317-4318/tcp, :::4317-4318->4317-4318/tcp, 0.0.0.0:8888-8889->8888-8889/tcp, :::8888-8889->8888-8889/tcp, 55679/tcp otel-collector
199+
```
200+
201+
If you only want to install rustfs, do not want to deploy grafana,prometheus,etc, please comment below lines in `docker-compose.yml` file,
202+
203+
```
204+
#depends_on:
205+
# - otel-collector
206+
```
207+
208+
Then, run the command,
209+
210+
```
211+
docker compose -f docker-compose.yml up -d rustfs
212+
```
213+
214+
This way will only install and start `rustfs-server` service, namely rustfs container,
215+
216+
```
217+
docker ps
218+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
219+
e07121ecdd39 rustfs/rustfs:latest "/entrypoint.sh rust…" 2 seconds ago Up 1 second (health: starting) 0.0.0.0:9000-9001->9000-9001/tcp, :::9000-9001->9000-9001/tcp rustfs-server
220+
```
221+
222+
Whether you start only the `rustfs-server` or together with observability services, you can access the RustFS instance via `http://localhost:9000` using the default username and password (`rustfsadmin` for both).
223+
224+
## 4. Verification and Access
177225

178226
1. **View Container Status and Logs:**
179227

docs/zh/installation/docker/index.md

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Docker 安装 RustFS"
3-
description: "RustFS Docker 部署"
3+
description: "使用 Docker 或 Docker Compose 安装部署 RustFS"
44
---
55

66
# Docker 安装 RustFS
@@ -175,7 +175,55 @@ docker run -d \
175175
-e RUSTFS_TLS_PATH=/certs \
176176
```
177177

178-
## 五、验证与访问
178+
### Docker Compose 安装
179+
180+
RustFS 官方提供了 Docker Compose 的安装方式,[`docker-compose.yml`](https://github.com/rustfs/rustfs/blob/main/docker-compose.yml)文件中包含多个服务,包括 `grafana``prometheus``otel-collector``jaeger` 等,主要围绕可观测性。如果你想同时部署这些服务,克隆 [RustFS 代码仓库](https://github.com/rustfs/rustfs)到本地:
181+
182+
```
183+
git clone git@github.com:rustfs/rustfs.git
184+
```
185+
186+
然后在根目录下执行:
187+
188+
```
189+
docker compose --profile observability up -d
190+
```
191+
192+
会启动如下容器:
193+
194+
```
195+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
196+
c13c23fe3d9d rustfs/rustfs:latest "/entrypoint.sh rust…" 6 seconds ago Up 5 seconds (health: starting) 0.0.0.0:9000-9001->9000-9001/tcp, :::9000-9001->9000-9001/tcp rustfs-server
197+
e3f4fc4a83a2 grafana/grafana:latest "/run.sh" 7 seconds ago Up 5 seconds 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp grafana
198+
71ef1b8212cf prom/prometheus:latest "/bin/prometheus --c…" 7 seconds ago Up 5 seconds 0.0.0.0:9090->9090/tcp, :::9090->9090/tcp prometheus
199+
e7db806b2d6f jaegertracing/all-in-one:latest "/go/bin/all-in-one-…" 7 seconds ago Up 5 seconds 4317-4318/tcp, 9411/tcp, 0.0.0.0:14250->14250/tcp, :::14250->14250/tcp, 14268/tcp, 0.0.0.0:16686->16686/tcp, :::16686->16686/tcp jaeger
200+
1897830a2f1e otel/opentelemetry-collector-contrib:latest "/otelcol-contrib --…" 7 seconds ago Up 5 seconds 0.0.0.0:4317-4318->4317-4318/tcp, :::4317-4318->4317-4318/tcp, 0.0.0.0:8888-8889->8888-8889/tcp, :::8888-8889->8888-8889/tcp, 55679/tcp otel-collector
201+
```
202+
203+
如果你仅仅想安装 rustfs,不想启动其他服务,那么你需要在 `docker-compose.yml` 中注释掉:
204+
205+
```
206+
#depends_on:
207+
# - otel-collector
208+
```
209+
210+
然后执行命令:
211+
212+
```
213+
docker compose -f docker-compose.yml up -d rustfs
214+
```
215+
216+
只启动了 `rustfs-server` 这一个服务:
217+
218+
```
219+
docker ps
220+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
221+
e07121ecdd39 rustfs/rustfs:latest "/entrypoint.sh rust…" 2 seconds ago Up 1 second (health: starting) 0.0.0.0:9000-9001->9000-9001/tcp, :::9000-9001->9000-9001/tcp rustfs-server
222+
```
223+
224+
不管是单独启动 `rustfs-server` 还是和可观测性的服务一起启动,对于 RustFS 实例的访问都是通过 `http://localhost:9000`,并使用默认用户名和密码(均为 `rustfsadmin`)。
225+
226+
## 四、验证与访问
179227

180228
1. **查看容器状态与日志:**
181229

@@ -198,7 +246,7 @@ docker run -d \
198246
如能成功创建并列举 bucket,则部署生效。
199247

200248

201-
## 、其他建议
249+
## 、其他建议
202250

203251
1. 生产环境建议:
204252
- 使用多节点部署架构

0 commit comments

Comments
 (0)