Skip to content

Commit 4397458

Browse files
authored
update docker compose installation docs. (#52)
* Docs: update docker compose installation * fix docs typo * revert typo fix due to a mr already exists
1 parent 11c93dc commit 4397458

File tree

2 files changed

+97
-1
lines changed

2 files changed

+97
-1
lines changed

docs/en/installation/docker/index.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,54 @@ docker run -d \
156156
-e RUSTFS_TLS_PATH=/certs \
157157
```
158158

159+
### Docker Compose Installation
160+
161+
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,
162+
163+
```
164+
git clone git@github.com:rustfs/rustfs.git
165+
```
166+
167+
Running the command under root directory,
168+
169+
```
170+
docker compose --profile observability up -d
171+
```
172+
173+
Started containers is as below,
174+
175+
```
176+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
177+
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
178+
e3f4fc4a83a2 grafana/grafana:latest "/run.sh" 7 seconds ago Up 5 seconds 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp grafana
179+
71ef1b8212cf prom/prometheus:latest "/bin/prometheus --c…" 7 seconds ago Up 5 seconds 0.0.0.0:9090->9090/tcp, :::9090->9090/tcp prometheus
180+
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
181+
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
182+
```
183+
184+
If you only want to install rustfs, do not want to deploy grafana,prometheus,etc, please comment below lines in `docker-compose.yml` file,
185+
186+
```
187+
#depends_on:
188+
# - otel-collector
189+
```
190+
191+
Then, run the command,
192+
193+
```
194+
docker compose -f docker-compose.yml up -d rustfs
195+
```
196+
197+
This way will only install and start `rustfs-server` service, namely rustfs container,
198+
199+
```
200+
docker ps
201+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
202+
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
203+
```
204+
205+
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).
206+
159207
## 4. Verification and Access
160208

161209
1. **View Container Status and Logs:**

docs/zh/installation/docker/index.md

Lines changed: 49 additions & 1 deletion
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
@@ -157,6 +157,54 @@ docker run -d \
157157
-e RUSTFS_TLS_PATH=/certs \
158158
```
159159

160+
### Docker Compose 安装
161+
162+
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)到本地:
163+
164+
```
165+
git clone git@github.com:rustfs/rustfs.git
166+
```
167+
168+
然后在根目录下执行:
169+
170+
```
171+
docker compose --profile observability up -d
172+
```
173+
174+
会启动如下容器:
175+
176+
```
177+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
178+
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
179+
e3f4fc4a83a2 grafana/grafana:latest "/run.sh" 7 seconds ago Up 5 seconds 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp grafana
180+
71ef1b8212cf prom/prometheus:latest "/bin/prometheus --c…" 7 seconds ago Up 5 seconds 0.0.0.0:9090->9090/tcp, :::9090->9090/tcp prometheus
181+
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
182+
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
183+
```
184+
185+
如果你仅仅想安装 rustfs,不想启动其他服务,那么你需要在 `docker-compose.yml` 中注释掉:
186+
187+
```
188+
#depends_on:
189+
# - otel-collector
190+
```
191+
192+
然后执行命令:
193+
194+
```
195+
docker compose -f docker-compose.yml up -d rustfs
196+
```
197+
198+
只启动了 `rustfs-server` 这一个服务:
199+
200+
```
201+
docker ps
202+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
203+
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
204+
```
205+
206+
不管是单独启动 `rustfs-server` 还是和可观测性的服务一起启动,对于 RustFS 实例的访问都是通过 `http://localhost:9000`,并使用默认用户名和密码(均为 `rustfsadmin`)。
207+
160208
## 四、验证与访问
161209

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

0 commit comments

Comments
 (0)